From 68e1eea67bacb028eb87c30161e887548fc8ebd4 Mon Sep 17 00:00:00 2001 From: magical-tutorial-4913 Date: Fri, 16 Oct 2020 02:37:03 +0000 Subject: [PATCH] Done. --- square_array.rb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/square_array.rb b/square_array.rb index 852a8fe32..2c2376054 100644 --- a/square_array.rb +++ b/square_array.rb @@ -1,3 +1,10 @@ -def square_array(array) - # your code here -end \ No newline at end of file +numbers = [1, 2, 3] +def square_array(numbers) + ary = Array.new + numbers.each do | number | +square = number ** 2 + ary << square +end + return ary +end +