5 ms·
I was actually asked Fizz Buzz in an interview once, but I did not have this solution at the time. My favorite FizzBuzz solution is actually: ``` ->(n){[[["Fi
by philcrissman 6y ago
I was actually asked Fizz Buzz in an interview once, but I did not have this solution at the time.
My favorite FizzBuzz solution is actually:
```
->(n){[[["Fizz"][n%3],["Buzz"][n%5]].join].find(->{n}){|w| w if !w.empty?}}
```
This is Ruby, of course, probably something very similar can be done in several other languages.