Answers for "generating 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 "generating a random bool in swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language