check if string is interpretable as int
Hi,
This might be a very basic question: is there a way in javascript to determine whether a string is interpretable as an int?
In java there is Integer.parseInt(String). Is there something similar in javascript? I didn't find it in docs so far.
Cheers,
Mattijs
Ok, sorry. Found it. I was confused because parseInt gave a strange output when posted, "1#R" if not cast to string. And I found the isNaN method :)
Thanks,
Mattijs