From e59a50b01c9c4aa6dddb4592f4eea00a653afd91 Mon Sep 17 00:00:00 2001 From: Jahaira Marrero Date: Sun, 11 Oct 2020 04:16:09 +0000 Subject: [PATCH] Done. --- square_array.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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