Answers for "how to make a random bool in swift"

0

generate random bool swift

let flippedHeads = Bool.random()
if flippedHeads {
    print("Heads, you win!")
} else {
    print("Maybe another try?")
}
Posted by: Guest on April-09-2020

Code answers related to "Swift"

Browse Popular Code Answers by Language