|||const name1 = 'Jack';|
|||const name2 = 'Jill';|
|||console.log('Hello ' + name1 + ' and ' + name2);|
Code with multiple +s often gets unwieldy, unpleasant, hard to maintain, and boring to write. This is where template literals come in.
Template literals are strings with embedded expressions. The expressions may be a single variable, multiple variables with operators, a function ...