Everybody who fizzes the buzzes misses that fizzbuzz entity is redundant:
You're right ✨ Thank you for your reply 💖
Object#presence (in Active Support Core Extensions) makes it simpler 😄
require 'active_support' require 'active_support/core_ext/object/blank' numbers \ .zip(fizzes, buzzes) \ .map { |n, fizz, buzz| "#{fizz}#{buzz}".presence || n } \ .take(30) \ .each(&method(:puts))
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You're right ✨ Thank you for your reply 💖
Object#presence (in Active Support Core Extensions) makes it simpler 😄