Introduction
The static String.raw()
method is a tag function of template literals.
To get the raw template literal contents from template literals, use the String.raw tag function.
console.log(String.raw`Hi\n${2+3}!`);
let name = 'Bob';
console.log(String.raw`Hi\n${name}!`);
PreviousNextRelated