Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A FizzBuzz paradise. More variants to come.
for (i = 0; i < 100; i++)
{
var test = "";
if (i % 3 == 0) //multiple of 3
{ test += "fizz"; }
if (i % 5 == 0) //multiple of 5
{ test += "buzz"; }
if (test == "") //no multiple
{ test = i; }
document.write(test + "<br \>"); //print
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.