“JS ``” Kode Jawaban

JS ``

`string text ${expression} string text`
Nervous Nightingale

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

`` Dalam JavaScript

// ` ` or a string literal allows you to include javascript in a string easily

a = 3

//instead of:
console.log("the value of a is " + a)

//you can use a string literal:
console.log("the value of a is ${a}")



//you can use javascript
a = 3
b= 5
console.log("a is ${a}, b is ${b}, and a plus b is ${a + b}.")
Powerful Piranha

Jawaban yang mirip dengan “JS ``”

Pertanyaan yang mirip dengan “JS ``”

Lebih banyak jawaban terkait untuk “JS ``” di JavaScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya