How to replace double comma with a single comma in javascript
<p>How can I convert this <code>2016-01-04</code> into this <code>2016-01-04</code> in JavaScript?</p>

<p>I have a dataset in an array with dates like this:</p>

<pre><code>["x", "2016-01-04", "2016-01-05", "2016-01-06", "2016-01-07", "2016-01-08", "2016-01-09"]
</code></pre>

<p>And I want to covert them to:</p>

<pre><code>['x', '2016-01-04', '2016-01-05', '2016-01-06', '2016-01-07', '2016-01-08', '2016-01-09']
</code></pre>

<p>I have tried <code>.replace(/"/g, "'")</code></p>

<p>but I get an error <code>forcastDate_ordered.replace is not a function</code></p>