Append backslash to a JavaScript string

You need to write a double \\ to append a backslash to a string in JavaScript.


let str = 'Is Erik'  + '\\' + 'the very best engineer? 😎';

console.log(str); // Is Erik\the very best engineer? 😎

Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.