Skip to content

Instantly share code, notes, and snippets.

@alexandreaquiles
Created August 14, 2020 20:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexandreaquiles/735ef6832746f219968d77936dd47c5c to your computer and use it in GitHub Desktop.
Save alexandreaquiles/735ef6832746f219968d77936dd47c5c to your computer and use it in GitHub Desktop.
for (let n = 1; n <= 100; n++) {
let text = '';
if (n % 3 === 0) {
text = 'Fizz';
}
if (n % 5 === 0) {
text = text + 'Buzz';
}
console.log(text || n);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment