title: How to escape backslash in JavaScript?
body: <p>I want to replace backslash => '\' with secure <code>&amp;#92;</code> replacement. </p>
  
  <p>But my code replacing all '#' fails when applied for replacing '\':</p>
  
  <pre><code>el = el.replace(/\#/g, '&amp;#35;'); // replaces all '#' //that's cool
  el = el.replace(/\\/g, '&amp;#92;'); // replaces all '\' //that's failing
  </code></pre>
  
  <p>Why?</p>