This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Fibonacci { | |
constructor(countUntil) { | |
this.a = 0; | |
this.b = 1; | |
this.c = 1; | |
this.r = [this.a, this.b]; | |
if(countUntil) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.extend({ | |
repeat : function(times, callback) { | |
var t = parseInt(times) | 0, i = 0; | |
if (t <= 0) | |
return console.warn('repeat() 1st argument expects unsigned int greater than 0 .'); | |
if (typeof (callback) != 'function') | |
return console.warn('repeat() 2nd argument expects function'); | |
var x = t; | |
while (x > i)callback(i++); | |
} |
NewerOlder