⬅︎ Back to isInt() JavaScript function
that will fail for negative numbers.
how about this: String.prototype.isInt = function() { var re = new RegExp("^[\d]+$"); return this.match(re); }
Comment
that will fail for negative numbers.
Parent comment
how about this: String.prototype.isInt = function() { var re = new RegExp("^[\d]+$"); return this.match(re); }