diff --git a/square_array.rb b/square_array.rb index 852a8fe32..f09e64bd6 100644 --- a/square_array.rb +++ b/square_array.rb @@ -1,3 +1,8 @@ def square_array(array) # your code here -end \ No newline at end of file +counter = 0 + array.each do |i| + array[counter] = i**2 +counter+=1 + end +end