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