Skip to content

Instantly share code, notes, and snippets.

@Yuffster
Created October 17, 2012 09:31
Show Gist options
  • Select an option

  • Save Yuffster/3904670 to your computer and use it in GitHub Desktop.

Select an option

Save Yuffster/3904670 to your computer and use it in GitHub Desktop.
(function fizzBuzz(n) {
var rules = {3: 'Fizz', 5: 'Buzz'}, x, str = '';
for (x in rules) if (!(n%x)) str += rules[x];
return ((--n>0) ? fizzBuzz(n) : '') + (str || ++n) + '\n';
})(100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment