Javascript endWith()

Posted by Ruth on Stack Overflow See other posts from Stack Overflow or by Ruth
Published on 2010-05-07T16:09:05Z Indexed on 2010/05/07 16:18 UTC
Read the original article Hit count: 321

Filed under:

Hi all

I'm having trouble getting the following to work

if(str.endsWith('+')
{
   alert("ends in plus sign")
}

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

Thanks in advance Ruth

© Stack Overflow or respective owner

Related posts about JavaScript