dollar sign brackets javascript 1

dollar sign brackets javascript

//Multiline strings:
console.log(`foo
bar`);
// foo
// bar
//String interpolation:
var foo = 'bar';
console.log(`Let's meet at the ${foo}`);
// Let's meet at the bar

Here is what the above code is Doing:
1. The first line is a comment.
2. The second line is a single-line string.
3. The third line is a multiline string.
4. The fourth line is a string with interpolation.

Similar Posts