DEV Community

Discussion on: Solving the FizzBuzz Interview Question with JavaScript

Collapse
 
therickedge profile image
Rithik Samanthula

Yeah, that's awesome

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


`