Mastering Enumerable, Part 1

Flashcard 5 of 7

Is there a way to avoid the negation inside this block?

users.select { |user| !user.admin? }

reject fits the bill:

users.reject { |user| user.admin? }
Return to Flashcard Results