Created
January 26, 2026 15:22
-
-
Save Lysak/0b159f190ebfc6fb83c5607a05579789 to your computer and use it in GitHub Desktop.
fizzbuzz.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for (let i = 1; i <= 30; i++) { | |
| const fizz = !(i % 3); | |
| const buzz = !(i % 5); | |
| if (fizz && buzz) console.log("FizzBuzz"); | |
| else if (fizz) console.log("Fizz"); | |
| else if (buzz) console.log("Buzz"); | |
| else console.log(i); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment