Answers for "how to flip or toggle boolean value in swift"

1

how to flip or toggle boolean value in swift

let boolValue = true
boolValue = !boolValue // prints false
boolValue.toggle() // prints false
Posted by: Guest on January-27-2022

Code answers related to "how to flip or toggle boolean value in swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language