package main
import (
"fmt"
"math"
)
func main() {
x, y := 2, 1
// The condition must be a bool!
/// If it's not, it's a compiler error.
if x > y {
fmt.Println("Yay")
}
a, b := 1, 2
if a == b {
fmt.Println("Equal")
} else {
fmt.Println("Not equal")
}
myString := "submarine"
if myString == "frog" {
fmt.Println("Yay!")
} else if myString == "submarine" {
fmt.Println("Meh")
}
if val := math.Floor(12.5); val > 10 {
// We can only access val in here
fmt.Println(val)
}
// Can't access val anymore!
}