How many times did you have this in your code: var str = getSomeNumber(); //say, 1212 var num = parseInt(str); window.alert('Number is: ' + num); //Number is: 1212 Nothing special about it... or is it? It happens that JavaScript's parseInt function is...