I need to check whether justPrices[i].substr(commapos+2,1).
The string is something like: \"blabla,120\"
In this case it would check whether \'0
As far as I know, easiest way is just to multiply by 1:
var character = ... ; // your character
var isDigit = ! isNaN(character * 1);
Multiplication by one makes a number from any numeric string (as you have only one character it will always be an integer from 0 to 9) and a NaN for any other string.