ugly-fizzbuzz.js
· 153 B · JavaScript
Raw
const fizzBuzz = (num=1) => num <= 100 && (
console.log(((num % 3 === 0 ? 'fizz' : '') + (num % 5 === 0 ? 'buzz' : '')) || num)
|| fizzBuzz(num + 1)
)
1 | const fizzBuzz = (num=1) => num <= 100 && ( |
2 | console.log(((num % 3 === 0 ? 'fizz' : '') + (num % 5 === 0 ? 'buzz' : '')) || num) |
3 | || fizzBuzz(num + 1) |
4 | ) |
5 |