diff --git a/square_array.rb b/square_array.rb index 852a8fe32..cedeb2574 100644 --- a/square_array.rb +++ b/square_array.rb @@ -1,3 +1,7 @@ + def square_array(array) - # your code here -end \ No newline at end of file + number = [] + array.each {|numbers| number << numbers**2} + number +end +