title: NodeJS escaping back slash
body: <p>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.</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Why when I am printing <code>options</code> object <strong>both slashes</strong> are coming?</p>
  
  <p>I had feeling that I am doing something really/badly wrong here, which may be basics. </p>
  
  Update:
  
  <p>When I am using this object <code>options</code> the value is passing as it is (with double slashes), and I am using this with my SOAP services, and getting 401 error due to invalid user property value. </p>
  
  <p>But when I tried the same with PHP code using same user value its giving proper response, in PHP also we are escaping the value with two slashes.</p>