“f String JavaScript” Kode Jawaban

f String JavaScript

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

JavaScript interpolasi string

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

f String JavaScript

const number = 123;
// ` ${somethign} `
`Here you can put any variable ${number} or expression ${number > 100 ? "big" : "small"}`
Cautious Crayfish

Format String JavaScript

//

const firstName = 'john';
const lastName = 'smith';

const output = `name: ${firstName}, surname: ${lastName}`;
// name: john, surname: smith
Beautiful Bear

Jawaban yang mirip dengan “f String JavaScript”

Pertanyaan yang mirip dengan “f String JavaScript”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya