Try executing the following in JavaScript:
parseInt(\'01\'); //equals 1 parseInt(\'02\'); //equals 2 parseInt(\'03\'); //equals 3 parseInt(\'04\'); //equals
Specify the base:
var number = parseInt(s, 10);