R

Ravina • 3.59K Points
Extraordinary

Q. How is a range from 1 to 5 (inclusive) written in Swift?

  • (A) 1..<5
  • (B) 1...5
  • (C) [1...5]
  • (D) 1 to 5
  • Correct Answer - Option(B)
  • Views: 9
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Ravina
`...` creates a closed range that includes both start and end values.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.