Iterate literally means 'to perform repeatedly'. While human beings get bored of doing something repeatedly, machines excel at it.
To "iterate over an array" means to perform the same task over and over again, once for each item in the array.
There are several ways to iterate over an array, but here's a list of some of the most useful methods you may consider looking up:
.each
iteration.each_with_index
iterationfor ___ in ____
iteration.times do
iteration
The challenges and the datasets are all in a file called iterate.rb
, and you'll be writing your own puts or print statements.
To test your code, type ruby iterate.rb
in the console.