“Template String JavaScript” Kode Jawaban

JavaScript interpolasi string

const age = 3
console.log(`I'm ${age} years old!`)
Drab Dogfish

String literal javascript

`string text`

`string text line 1
 string text line 2`

`string text ${expression} string text`

tag`string text ${expression} string text`
Happy Heron

string template di js

const name = 'JavaScript';
console.log(`I love ${name}`); // I Love JavaScript
Easy Earthworm

Template String JavaScript

/*
The template string is indicated with a dollar sign and curly brackets 
(${expression}) inside the backtick symbol.
*/

//Template String
const name = 'Muhammad Shahnewaz';
const result = `${name} is a good boy`;
console.log(result);  //Muhammad Shahnewaz is a good boy
Tiny Coders

Jawaban yang mirip dengan “Template String JavaScript”

Pertanyaan yang mirip dengan “Template String JavaScript”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya