I need to find if a comma exists in a javascript string so I know whether to do str.split(',') on it or not.
Is this the correct way: var myVar = str.search(','); ?
If the value of myVar is greater than 0 (zero) then there is a comma in the string?
I'm just not sure if I've got the parameter right in search()
Thanks!