(function(){
window.fibonacci = function(){
var n = new Number(1);
n.next = next;
return n;
};
function next(){
var n = new Number( this + (this.prev||0) );
n.prev = +this;
n.next = next;
return n;
};
})();
jsperf.com/fibonacci-battle
No comments:
Post a Comment