Re:Show HN: A Javascript library to overcomplicate Five
by dclowd9901 on Thursday July 17, 2014 @11:40AM
(#8048115)
Really makes me wish you could invoke instance methods on numbers (ala 5.amIFive())
[ Parent
| on HN ]
Re:Show HN: A Javascript library to overcomplicate Five
by Softcadbury on Thursday July 17, 2014 @11:46AM
(#8048153)
You can :)
Number.prototype.amIFive = function(){ return this.valueOf() == 5; }
5..amIFive();
Re:Show HN: A Javascript library to overcomplicate Five
by dclowd9901 on Friday July 25, 2014 @11:34AM
(#8085734)
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.