“JS ``” Code-Antworten

JS ``

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

String -Interpolation JavaScript

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

String buchstäblicher JavaScript

`string text`

`string text line 1
 string text line 2`

`string text ${expression} string text`

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

`` In 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

Ähnliche Antworten wie “JS ``”

Fragen ähnlich wie “JS ``”

Weitere verwandte Antworten zu “JS ``” auf JavaScript

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen