(no title)
dontchooseanick | 2 years ago
The average functional programmer writes this - and not a for loop :
````
const fizzbuzz = (n)=>(n%15==0)?"FizzBuzz":(n%5==0)?"Buzz":(n%3==0)?"Fizz":n;
Array(101).fill(0).map((_,i)=>fizzbuzz(i))
````
LordDragonfang|2 years ago
Also, can't help but snark that apparently the "average" FP is so preoccupied with showing off their one-liners that they fail the problem requirements (should be `Array(100).fill(0).forEach((_,i)=>console.log(fizzbuzz(i+1)))`).
graftak|2 years ago
boringuser2|2 years ago
Honestly, I don't understand the complaint, a lean stdlib isn't a shortcoming.
simonw|2 years ago
metalliqaz|2 years ago