Vaccano Vaccano - 1 year ago 75
Javascript Question

Does typescript/javascript have a @"\" equivalent like C#?

Is there a way that I can put slashes in a string in javascript without having to put two?

In C# I could do this:

@"This\is not used as an escape\"

(The @ in front of the string makes it not use \ as an escape char.)

Is there something like this in javascript/typescript?

Answer Source

No, there is not this kind of escaping in javascript

String literals

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download