diff --git a/square_array.rb b/square_array.rb index 852a8fe3..8c84deae 100644 --- a/square_array.rb +++ b/square_array.rb @@ -1,3 +1,3 @@ def square_array(array) - # your code here -end \ No newline at end of file + array.each_with_object([]) {|x, arr| arr << x ** 2 } +end