News for hackers. Stuff that matters.
Re:FizzBuzz in ten languages by rafkin98 on Monday December 31, 2018 @05:08PM (#18797353)
I like Ruby one liner from https://commandercoriander.net/blog/2013/02/03/fizzbuzz-in-o...

puts (1..100).map { |i| (fb = [["Fizz"][i % 3], ["Buzz"][i % 5]].compact.join).empty? ? i : fb }

There are no comments on this comment yet.