A

Admin • 802.91K Points
Coach

Q. What is the result of the following code?

Code:
let numbers = [1, 2, 3]
print(numbers.isEmpty)
  • (A) true
  • (B) false
  • (C) nil
  • (D) Error
  • Correct Answer - Option(B)
  • Views: 7
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Admin
The array contains elements, so `isEmpty` returns `false`.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.