Skip to content

Instantly share code, notes, and snippets.

@NobukazuHanada
Forked from kazuho/fizzbuzz.js
Last active September 3, 2015 04:26
Show Gist options
  • Save NobukazuHanada/61ecebde2b560d31dfaf to your computer and use it in GitHub Desktop.
Save NobukazuHanada/61ecebde2b560d31dfaf to your computer and use it in GitHub Desktop.
fizz = function f(n){
fizz = function(n){
fizz = function(n){
fizz = f;
return "Fizz";
};
return n;
};
return n;
};
buzz = function f(n) {
buzz = function (n) {
buzz = function (n) {
buzz = function (n) {
buzz = function (n) {
buzz = f;
return (n + "Buzz").replace(/\d*/,"");
};
return n;
};
return n;
};
return n;
};
return n;
};
n = 0;
fizzbuzz = function () {
n++;
console.log( buzz(fizz(n)) );
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment