title: how to replace \ with \\ using javascript string functions
body: <p>I have the following filepath</p>
  
  <pre><code>var imagepath="C:\Documents and Settings\Mahesh\Desktop\images\advts.png"
  </code></pre>
  
  <p>how can I replace \ with \ so so that it prints</p>
  
  <pre><code>var imagepath="C:\\Documents and Settings\\Mahesh\\Desktop\\images\\advts.png"
  </code></pre>