A

Admin • 828.03K Points
Coach

Q. Which of these is the correct syntax for a for-in loop in Swift?

  • (A) for i = 0 to 10
  • (B) foreach i in 0...10
  • (C) for i in 0...10
  • (D) loop i from 0 to 10
  • Correct Answer - Option(C)
  • Views: 15
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Admin
`for i in 0...10` iterates from 0 to 10 including 10.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.