DEV Community

Discussion on: Solving the FizzBuzz Interview Question with JavaScript

Collapse
 
dannyengelman profile image
Danny Engelman

But unreadable and not easy to extend

let FB = Array(100)
  .fill((x, div, label) => x % div ? "" : label)
  .map((func, idx) =>
    func(++idx, 3, "Fizz") + func(idx, 5, "Buzz") || idx
  );
Enter fullscreen mode Exit fullscreen mode


`