Hacker News new | ask | show | jobs
by iamsaitam 1162 days ago
Indeed, much cleaner to do `Array.from({length: 100}, (_,i) => fizzbuzz(i));`
1 comments

While we're cleaning it up:

   fizzbuzz = i => (i % 3 ? "" : "Fizz") + (i % 5 ? "" : "Buzz") || i
   Array.from({length: 100}, (_,i) => console.log(fizzbuzz(i+1)))