Javascript endWith()
<p>I'm having trouble getting the following to work</p>

<pre><code>if(str.endsWith('+')
{
   alert("ends in plus sign")
}
</code></pre>

<p>How do I escape the plus sign, I've tried /\ +/ but it doesn't work.</p>

<p>Thanks in advance
Ruth</p>
