We can work with escape sequence in strings on JavaScript. For example, I can write \\ and it means \. But I don’t want to use a escape sequence.
I know that on C# I can write @”My string” and I don’t need to escape anything. Is there similar syntax in JavaScript?
There is no such syntax, but there is a work around:
Because it’s so verbose it’s only worth using this when you have something that would be otherwise unreadable (eg: a pretty long string with a bunch of characters that need escaping).