Ruby - Loops and Iteration
Which of the following is the correct syntax for a
for loop in Ruby to iterate over an array ["a", "b", "c"]?for loop in Ruby to iterate over an array ["a", "b", "c"]?for variable in collection do ... end or without do.for x in array do ... end. for (x : ["a", "b", "c"]) puts x end and C use invalid syntax. for x in ["a", "b", "c"] puts x misses end to close the loop.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions