Puzzle 6 Explanation: Timeout
Understand how types can make differences.
We'll cover the following...
We'll cover the following...
Try it yourself
Try executing the code below to see the result for yourself.
Go (1.16.5)
package mainimport ("fmt""time")func main() {timeout := 3fmt.Printf("before ")time.Sleep(timeout * time.Millisecond)fmt.Println("after")}
Explanation
When we write timeout := 3
, the Go ...