From 90c1c110ec5c433de797963b3eca41f2ee56f46f Mon Sep 17 00:00:00 2001 From: Christian Zambrana Date: Thu, 11 Jul 2019 11:33:17 +0000 Subject: [PATCH] Done. --- lib/square_array.rb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/square_array.rb b/lib/square_array.rb index 852a8fe..b0389d0 100644 --- a/lib/square_array.rb +++ b/lib/square_array.rb @@ -1,3 +1,10 @@ -def square_array(array) - # your code here -end \ No newline at end of file +def square_array(array) + # your code here + squared = [] + count = 0 + while count < array.size do + squared << (array[count] ** 2) + count = count + 1 + end + squared +end