Swift Boolean

Main Idea

A basic data type that holds a single True or False value.


// .toggle() and ! Is the same.
gameOver = False
gameOver.toggle()
print(gameOver)
isAuthenticated = False
isAuthenticated = !isAuthenticated
print(isAuthenticated)

Notes mentioning this note


Here are all the notes in this garden, along with their links, visualized as a graph.