Do you know what will be the output of this code?
JavaScript
console.log(String.raw`HelloTwitter\nworld`);
Show answer and explanation
What String.raw actually does is taking a template literal, processing all substitutions (${variable}, e.g.), but ignoring well-known escape-sequences.
The following will be printed above: HelloTwitter\nworld
\n is a well-known escape-sequence, like \t is, e.g.
Those will simply be ignored and put into the resulting string, as they are.
Here an example of how String.raw works when you also include substitutions:
const varOne = "Hey";
const varTwo = "there";
const str = String.raw`${varOne}\t\n${varTwo}` // => "Hey\t\nthere"