Why does it always return 49999 no matter what strToSearch variable holds? Even with the clank search variable it returns the same. Have I missed s
49999
strToSearch
In your 2nd if-Statement: since your strToSearch = "12" and do not contain a ",", the
strToSearch = "12"
","
o2.indexOf(",") != -1
will always return false.
false
Delete the hole if-Statement or at least the last part and it works.
if