Question: c) Consider the following code. let values = [3.0,6.0,9.0,1.0) let squares = values.map {$0 * $0} print(squares) What is the output of the above code?
c) Consider the following code. let values = [3.0,6.0,9.0,1.0) let squares = values.map {$0 * $0} print(squares) What is the output of the above code? Explain what is map in the above code snippet. NIT6120 Mobile Development Trimester 3, 2020 Page 10 of 10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
