1. Variables and constants
  2. Types of Data
  3. Operators
  4. String interpolation
  5. Arrays
  6. Dictionaries
  7. Conditional statements
  8. Loops
  9. Switch case

1. Operators

use ( ! ) to flip the value of a boolean variable.

i.e

var istrue: Bool = true
!istrue

output

false

2. String Interpolation

using variable inside strings

var istrue: Bool = false
istrue = !istrue

print("the value of istrue variable is \(istrue)")