0
Q:

javascript string format

let soMany = 10;
console.log(`This is ${soMany} times easier!`);
// "This is 10 times easier!
5
//

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

const output = `name: ${firstName}, surname: ${lastName}`;
// name: john, surname: smith
8
`string text ${expression} string text`
3
var my_name = 'John';
var s = `hello ${my_name}, how are you doing`;
console.log(s); // prints hello John, how are you doing
0

New to Communities?

Join the community