title: how can i replace first two characters of a string in javascript?
body: <p>lets suppose i have string </p>
  
  <pre><code>var string = "$-20455.00"
  </code></pre>
  
  <p>I am trying to swap first two characters of a string. I was thinking to split it and make an array and then replacing it, but is there any other way? Also, I am not clear how can I achieve it using arrays? if I have to use arrays.</p>
  
  <pre><code>var string = "-$20455.00"
  </code></pre>
  
  <p>How can I achieve this?</p>