Question #158

Author: admin
tags: Go  
package main

import (
	"fmt"
	"time"
)

func say(text string, pause time.Duration) {
	time.Sleep(pause * time.Millisecond)
	fmt.Println(text)
}

func main() {
	go say("1", 1000)
	go say("2", 1200)
	fmt.Println("3")
}
What will be printed?
1
2
3
1
2
3
3
1
2
3
2
1
2
1
3
Program execution begins by initializing the main package and then invoking the function main.
When that function invocation returns, the program exits.
It does not wait for other (non-main) goroutines to complete.
Rate the difficulty of the question:
easyhard