Skip to content

Instantly share code, notes, and snippets.

@brouwerfp
Forked from kazuho/fizzbuzz.js
Created July 2, 2020 12:23
Show Gist options
  • Select an option

  • Save brouwerfp/8c432c646aba26588c2a556a7390d089 to your computer and use it in GitHub Desktop.

Select an option

Save brouwerfp/8c432c646aba26588c2a556a7390d089 to your computer and use it in GitHub Desktop.
fizz = function f() {
fizz = function () {
fizz = function () {
fizz = f
return "Fizz"
}
}
}
buzz = function f() {
buzz = function () {
buzz = function () {
buzz = function () {
buzz = function () {
buzz = f
return "Buzz"
}
}
}
}
}
n = 0
fizzbuzz = function () {
++n
console.log((fizz() || "") + (buzz() || "") || n)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment