...

/

Puzzle 6 Explanation: Timeout

Puzzle 6 Explanation: Timeout

Understand how types can make differences.

We'll cover the following...

Try it yourself

Try executing the code below to see the result for yourself.

Press + to interact
package main
import (
"fmt"
"time"
)
func main() {
timeout := 3
fmt.Printf("before ")
time.Sleep(timeout * time.Millisecond)
fmt.Println("after")
}

Explanation

When we write timeout := 3, the Go ...