The use of back-ticks (``)
// Example #1
const vegetableList =
`<ul>
<li>Potato</li>
<li>Onion</li>
<li>Broccoli</li>
</ul>`;
document.querySelector('.vegetables').innerHTML = vegetableList;
// Example #2
function like(thing) {
return 'I like ' + thing;
}
function love(thing) {
return `I love ${thing}`;
}
const sentence = `<p>${like('apple')}, but ${love('oranges')}</p>`;
document.querySelector('.interpolation').innerHTML = sentence;