-1

I know from C#, that you can mark a string as not escaping any characters by using the @ symbol as such:

string foo = @"\n this is actually \n";

Is the same possible in JavaScript, or do you have to escape all characters manually?

  • 1
    possible duplicate of [Does javascript have literal strings?](http://stackoverflow.com/questions/2553738/does-javascript-have-literal-strings) – CodingIntrigue Jun 23 '15 at 11:32

1 Answers1

0

Short answer No. You can however post the strings in a form field in HTML and then read the string from there after the page is loaded. but that's a hackish solution and probaly not what you're looking for.

Tschallacka
  • 27,901
  • 14
  • 88
  • 133