Replace all String with empty string starting with -- : <p>i have string which is</p>

<pre><code>testVariable--423h33c7uhyga5tjk
</code></pre>

<p>now i want to replace the above string with</p>

<pre><code>testVariable
</code></pre>

<p>by using <code>javascript</code> replace function. </p>
