Comment

marchaos

that will fail for negative numbers.

Parent comment

Okonomiyaki3000

how about this: String.prototype.isInt = function() { var re = new RegExp("^[\d]+$"); return this.match(re); }