If I write this script :
alert(parseInt(\"123blahblahblah456\"));
I get the alert with the value 123
Ideally, shouldn\'t th
It's documented to behave like that:
If
parseInt
encounters a character that is not a numeral in the specified radix, it ignores it and all succeeding characters and returns the integer value parsed up to that point.
Whether that behaviour is a good idea is another matter, but it's too late to change it now.