package main

import "fmt"

func main() {
    // When multiple calls were deferred, the
    // calls are executed in LIFO order.

    defer fmt.Println("liftoff!")

    for i := 1; i <= 10; i++ {
        defer fmt.Printf("%d...\n", i)
    }
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: