diff --git a/square_array.rb b/square_array.rb index 852a8fe32..848aa9a63 100644 --- a/square_array.rb +++ b/square_array.rb @@ -1,3 +1,9 @@ -def square_array(array) - # your code here +def square_array(numbers) + + squared_numbers = [] + numbers.each do |num| + squared_numbers << (num ** 2) + end + return squared_numbers + end \ No newline at end of file