We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
This lesson is problematic, as it encourages a major ruby anti-pattern :(, namely, using conditionals such as if or unless inside of an iterator rather than using the built-in enumerables. While I realize it is intended as a gentle introduction, perhaps a lesson which does not include an iterator would be preferable?
# using the build-in enumerables...defscoring(array)array.reject{|user|user.is_admin?}.each{|user|user.update_score}end
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Ruby Control Structures - Unless
You are viewing a single comment's thread. Return to all comments →
This lesson is problematic, as it encourages a major ruby anti-pattern :(, namely, using conditionals such as if or unless inside of an iterator rather than using the built-in enumerables. While I realize it is intended as a gentle introduction, perhaps a lesson which does not include an iterator would be preferable?