Ruby - Loops and Iteration
What does the
each method do in Ruby when used on an array?each method do in Ruby when used on an array?eacheach method is used to run a block of code for every item in a collection like an array.each does to the arrayeach runs code on each item [OK]each processes items, does not change array [OK]each modifies the arrayeach with methods like mapeach returns a new array15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions