parseInt()
will do the job.
var num = '00898989899';
parseInt( num, 10 ); // 898989899
Don't forget about the radix argument, especially since you're dealing with leading zeros here.
If you can be sure that there won't be any zero digit after those leading zeros, you can even go more sneaky and use a combination of String.prototype.lastIndexOf()
and String.prototype.slice()
:
num.slice( num.lastIndexOf( '0' ) + 1 );