Javascript Number div10()

Description

Javascript Number div10()

Number.prototype.div10 = function () {
 return this/10;/*  w  ww.j  a va  2 s.co m*/
}


Object.prototype.say = function (s) {
 console.log('I say ' + s);
}

var o = {};
o.say("Hello");

var n = 120;
console.log(n.div10());

//console.log(35.div10());
console.log(Number(35).div10());



PreviousNext

Related