R

Ravina • 2.56K Points
Extraordinary

Q. How do you create a range from 1 to 5 in Swift?

  • (A) 1..<5
  • (B) 1...5
  • (C) [1-5]
  • (D) {1,2,3,4,5}
  • Correct Answer - Option(B)
  • Views: 1
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Ravina
`1...5` creates a closed range that includes 1 and 5.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.