// Chapter 17 example: what &&, || and ! give back. // Run with: go run exercises/17/02-bools.go package main import "fmt" func main() { yes := true no := false fmt.Println(yes && no) fmt.Println(no && yes) fmt.Println(yes || no) fmt.Println(no || yes) fmt.Println(!yes) fmt.Println(!no) level := 12 hasKey := true canEnter := level >= 10 && hasKey fmt.Println("Can enter:", canEnter) }