Ruby Iterators and Loops

Not CompletedWhile Loop Guide in Ruby

While loops are some of the most primitive ways of cycling through data. This lesson is all about loops, so it's sure going to be a fun one. The first loop that we'll see is the While loop.

Not CompletedRuby Each Iterator Method Tutorial

Being able to cycle through a list of values is something that you'll be doing on a daily basis. In this lesson, we are going to go through Ruby's popular iterator - the Each loop.

Not CompletedFor In Loops in Ruby Tutorial

If you're coming from other programming languages, you should be familiar with For loops. Ruby also has these loops, but they are not used frequently in real-world applications. This is mainly because the Each loop is more popular and easier to work with.

Not CompletedLooping Over a Hash in Ruby

In this video, we are going to walk through on how to build a nested iterator with a practical example, namely looping over a nested Hash in Ruby.

Not CompletedHow to Use the Select Method in Ruby

The select method is a powerful method that automatically iterates through a collection in a Ruby program and extracts the values you want. Enumerators are a fun and very powerful way of working with collections in Ruby, and after you get used to implementing the methods I think you'll be shocked at how efficient it is integrate advanced functionality.

Not CompletedHow to Use the Map Method in Ruby - Part 1

In the next few lessons, we are going to be covering the map method - a popular method used by Ruby developers almost on an everyday basis due to its flexibility and usefulness.

Not CompletedHow to Use the Map Method in Ruby - Part 2

In this lesson, we are going to go much deeper into the map method and explore practical ways of using the method.

Not CompletedHow to Sum Values in a Ruby Array Using the Inject Method

In this lesson, I'm going to show you how to sum up values in Ruby by implementing the powerful `inject` method and iterating over an array. Being able to sum up values in an array is something you will most likely need on a regular basis and Ruby makes this very straightforward to implement.


Ruby Iterators and Loops
    Unsupported Browser

    devCamp does not support ancient browsers.
    Install a modern version for best experience.