title: How to replace all '\' to '/' in nodejs
body: <p>I'm new to nodejs.<br/>Can anyone tell me how to replace all '\' to '/' ? Thanks.<br></p>
  
  <p>my code:<code>console.log(process.cwd());</code><br>
  result:<code>e:\Workspace\WebStorm\Ren\LittleCase</code></p>
  
  <p>I have tried the following methods：</p>
  
  <pre><code>console.log(process.cwd().replace('\\','/'));
  </code></pre>
  
  <p>However, only the first to be successfully replaced.like this:</p>
  
  <pre><code>e:/Workspace\WebStorm\Ren\LittleCase  
  </code></pre>