Boolean Value in Swift

Level 120 keystrokes

Combines a comparison with the logical AND operator && and prints the Bool result, true.

Swift code

// 5 > 3 is evaluated first (true); true && true gives true
1print(5 > 3 && true)

Output

true
Practice typing this code

Practice typing this code. Results are not recorded in the rankings.

Symbols in this code

The symbols you type in this Swift code and how often they appear.

  • &× 2
  • (× 1
  • )× 1
  • >× 1

More Swift examples at level 1

← Swift typing practice