Javascript Number int()
int()
Number.prototype.int = function(){ return parseInt(x); } var x = 90.89;//from w w w.j a v a 2s. c o m console.log(x.int());