// Your challenge is this: write a function that// accepts an optional array of integers and returns// one randomly. If the array is missing or empty,// return a random number in the range 1 through 100.funcrandomSelector(arr:[Int]?)->Int{arr?.randomElement()??Int.random(in:1...100)}print(randomSelector(arr:[0,4,5,6]))print(randomSelector(arr:nil))