Tagged Template Literals
by amindunited
JavaScript
function dogTemplate (strings, ...repl) {
console.log('strings', strings, repl);
}
const dogs = 'Labs'
const str = 'All ${dogs} are good ${dogs}';
const result = dogTemplate`${str}`;
console.log('result', result);