How to strip last element of dash delimited string in Javascript
<p>I have string delimited with dashes like:</p>

<pre class="lang-none prettyprint-override"><code>x#-ls-foobar-takemeoff-
</code></pre>

<p>How can I remove <code>takemeoff-</code> using javascript where <code>takemeoff-</code> can be any amount of characters ending in a dash?</p>
