NodeJS escaping back slash
问题 I am facing some issues with escaping of back slash, below is the code snippet I have tried. Issues is how to assign a variable with escaped slash to another variable. var s = 'domain\\username'; var options = { user : '' }; options.user = s; console.log(s); // Output : domain\username - CORRECT console.log(options); // Output : { user: 'domain\\username' } - WRONG Why when I am printing options object both slashes are coming? I had feeling that I am doing something really/badly wrong here,