February 26 - How to Count the Number of Items Filtered in a Ruby Array
In this guide we'll walk through how to count the number of items filtered in a Ruby array.
Guide Tasks
- Read Tutorial
- Watch Guide Video
- Complete the Exercise
Video locked
This video is viewable to users with a Bottega Bootcamp license
Already a Bottega Student? Sign In
Summary
Implement a method that counts all of the values in an array that over 10.
Exercise Description
Build out a method that counts the total number of array elements that are greater than 10
.
Sample Input
[100, 2, 5, 10, 11]
Expected Output
2
Real World Usage
This is a common Ruby coding interview question since it focuses on how well you know how to work with collections in Ruby.