Y
Hacker News
new
|
ask
|
show
|
jobs
by
Softcadbury
4349 days ago
You can :)
Number.prototype.amIFive = function(){ return this.valueOf() == 5; }
5..amIFive();
1 comments
dclowd9901
4341 days ago
Ah, so you have to have two dots... I suppose the first one denotes the floating point value, and the second denotes the prototype accessor. Very clever.
link