How to replace substring in Javascript?
<p>To replace substring.But not working for me...</p>

<pre><code>var str='------check';

str.replace('-','');
</code></pre>

<p><strong>Output:</strong> -----check</p>

<p>Jquery removes first '-' from my text. I need to remove all hypens from my text. My expected output is 'check'</p>
