Mrs. Endang's letter board: String.raw and a plain template side by side, one tile per character. Watch \n get processed or stay raw. An interactive…
Whenever a backslash is data rather than an escape (Windows paths, regex sources, LaTeX, SQL LIKE patterns), a plain template quietly changes your text without an error. String.raw fixes it with one prefix, no doubling every backslash. Two things still happen while the code is read, String.raw or not: a backslash before a backtick and before ${.
Every piece of a template is kept twice, and String.raw takes the raw one
String.raw turns off ${...} interpolation Interpolation still works. String.raw joins strings.raw with the ${…} values, and an inserted value is not processed again: ${folder} holding D:\data stays D:\data.${...} and the result is a mess \$ is an escape, so the ${ after it is no interpolation any more: String.rawC:\Users\${nama} gives the text C:\Users\${nama} as is. Insert the backslash as a value, C:\Users${'\\'}${nama}, or use / as the path separator.\d in a plain string quietly becomes just d An unknown escape is no error, its backslash just disappears. For a regex source use String.raw, a regex literal /\d/, or write \\d in a plain string.C:\temp\ The last backslash escapes the closing backtick, so the template never closes: SyntaxError. \\ is wrong too, String.raw keeps both. Insert it through ${'\\'}.\d or \w, then look at the plain template line An unknown escape is no error: its backslash is just dropped, \d becomes d. String.raw keeps both characters.\u that is no unicode code, like C:\users The plain template is a SyntaxError at once. String.raw still runs, and in the tag function strings[i] is undefined while strings.raw[i] is intact.${nama} \$ is an escape, so ${nama} stops being an interpolation and is printed as is, in String.raw too.