Here you can find the source of sum( number )
Number.prototype.sum = function ( number ) { return this + Number(number); }; var one = 1;/*from www . jav a2 s . com*/ console.log( one.sum(1) ); console.log( one.sum(" 3.04 ") ); console.log( one.sum("w") );