R

Ravina • 2.56K Points
Extraordinary

Q. What will this Swift code output?

Code:
let numbers = [1, 2, 3]
print(numbers.count)
  • (A) 3
  • (B) 2
  • (C) 1
  • (D) 0
  • Correct Answer - Option(A)
  • Views: 1
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Ravina
`count` returns the number of elements in the array.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.