Create a for loop that iterates up to `100` while outputting **"fizz"** at multiples of `3`, **"buzz"** at multiples of `5` and **"fizzbuzz"** at multiples of `3` and `5`
Importance
Low
Quiz Topics
JAVASCRIPT
Check out this version of FizzBuzz by Paul Irish.
for (let i = 1; i <= 100; i++) {let f = i % 3 == 0,b = i % 5 == 0;console.log(f ? (b ? 'FizzBuzz' : 'Fizz') : b ? 'Buzz' : i);}
It is not advisable to write the above during interviews though. Just stick with the long but clear approach. For more wacky versions of FizzBuzz, check out the reference link below.