swift random from to code example
Example: random number swift
let randInt = Int.random(in: 0...100)
// The range can be a closed (a...b) or half open (a..<b) range.
let randInt = Int.random(in: 0...100)
// The range can be a closed (a...b) or half open (a..<b) range.