Created
July 11, 2025 22:21
-
-
Save MarcelloDiSimone/31be9d2e02d43617df0e49340662a9b3 to your computer and use it in GitHub Desktop.
FizzBuzz
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
const fizzbuzz = n => (n % 3 ? '' : 'Fizz') + (n % 5 ? '' : 'Buzz') || n; | |
arr = [...Array(100).keys()] | |
.map((i) => ++i) | |
.map((i) => fizzbuzz(i)); | |
console.log(arr); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment