Skip to content

Glossary: Go Basics

&& , || , ! (logical operators)

Also written: &&, ||, !, and, or, not

`&&` means "and" (both conditions true), `||` means "or" (at least one true), and `!` flips true to false and back. Alex's shipping rule uses them, e.g. `wholesale && bags >= 10`.

Where the book teaches it

Related terms

boolif and else