Use raw string

A raw string can be used to avoid escaping only backslashes and dollars.


Do

var s = r'This is demo string \ and $';


Don't

var s = 'This is demo string \\ and \$';