Ruby - Loops and Iteration
You want to create an array of squares of numbers from 0 to 4 using
times. Which code correctly does this?times. Which code correctly does this?times returns the integer, not an array, we must create an empty array and push results inside the block.5.times with block parameter i, and appends i*i to the array correctly.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions