Rabid prototyping
  • Home

oneliner

A collection of 1 post

Challenge

A short as possible FizzBuzz JS oneliner

After a few iterations this is what I came up with: Array.apply(null, {length: 100}).map((_, x) => {x++; return x % 15 ? x % 5 ? x % 3 ? x : 'Fizz' : 'Buzz' : 'FizzBuzz'}) Initialize

  • Teemu Sarapisto
    Teemu Sarapisto
1 min read
Rabid prototyping © 2022
Latest Posts Ghost