R

Ravina • 3.96K Points
Extraordinary

Q. Which function creates a random integer within a range?

  • (A) random()
  • (B) Int.random(in: 1...10)
  • (C) randInt(1, 10)
  • (D) generate()
  • Correct Answer - Option(B)
  • Views: 25
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Ravina
`Int.random(in:)` is the standard way to generate a random integer in a range.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.