I need to check whether justPrices[i].substr(commapos+2,1).
justPrices[i].substr(commapos+2,1)
The string is something like: \"blabla,120\"
In this case it would check whether \'0
square = function(a) { if ((a * 0) == 0) { return a*a; } else { return "Enter a valid number."; } }
Source