title: Node.js consoling concern regarding backslashes
body: <p>This issue is not of high importance, however, I have found that when logging backslashes to the console, values are not outputted as expected.</p>
  
  <p>Please attempt the following two examples in your terminal to confirm the results; I have tried versions 0.10 and 0.12, and have also tried substituting '\\' with equivalents such as UTF hex codes and character codes... The behaviours are the same.</p>
  
  <p>Example one using <code>String.replace()</code>. I found this unexpected behaviour initially using a regex pattern, similar to <code>.replace(/([*\-\[\] etc...])/g, '\\$&amp;')</code>, however, the below code simplifies this scenario.</p>
  
  <pre><code>var bcks = '\\', str = 'Hello*';
  console.log('Backslash', bcks, '\nString', str);
  str.replace('*', bcks);
  </code></pre>
  
  <p>The output of which is the following:</p>
  
  <pre><code>Backslash \
  String Hello*
  'Hello\\'
  </code></pre>
  
  <p>Example two whilst using backslashes in a value in an object. This case was also found whilst using a <code>.replace(etc ...)</code>, but after reducing it to the following, the unexpected behaviour is still apparent.</p>
  
  <pre><code>var tmp = {key: 'Hello\\'}; console.log(tmp); console.log(tmp.key);
  </code></pre>
  
  <p>The output of which is the following:</p>
  
  <pre><code>{ key: 'Hello\\' }
  Hello\
  </code></pre>
  
  <p>It may be that <code>stdout</code> is simply the cause of this behaviour, but if this not the case then my concern is that this issue is not limited to just logging.</p>
  
  <p>Can anybody explain this behaviour?</p>
  
  <p><br></p>
  
  <p>Edit: In both examples, at no point should a consoled string, or object, output a double backslash.</p>