Created
May 6, 2016 14:12
-
-
Save tario/6126f1d45444ad1fad59aa49e1c0a844 to your computer and use it in GitHub Desktop.
This file contains 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
var z1 = function(array, value) { | |
console.log(value); | |
value++; | |
array[value%15](array,value); | |
}; | |
var print = function(str) { | |
return function(array, value){ | |
console.log(str); | |
value++; | |
array[value%15](array,value); | |
}; | |
}; | |
var fizz = print("Fizz"); | |
var buzz = print("Buzz"); | |
var fizzbuzz = print("FizzBuzz"); | |
var array = [fizzbuzz, z1,z1,fizz,z1,buzz,fizz,z1,z1,fizz,buzz,z1,fizz,z1,z1,fizzbuzz]; | |
z1(array, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment