Skip to content

Instantly share code, notes, and snippets.

@adamant83
Created February 16, 2023 21:21
Show Gist options
  • Select an option

  • Save adamant83/22ef87941be0a30b35320d71ddd76203 to your computer and use it in GitHub Desktop.

Select an option

Save adamant83/22ef87941be0a30b35320d71ddd76203 to your computer and use it in GitHub Desktop.
for (let i = 1; i <= 100; i++) {
let output = "";
if (i % 3 === 0) {
output = "Fizz";
}
if (i % 5 === 0) {
output += "Buzz";
}
if (output === "") {
output = i;
}
console.log(output);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment