package main
import "fmt"
// functions can return multiple results
func swap(x, y string) (string, string) {
return y, x
}
func main() {
a := "hello"
b := "world"
// although a, b = b, a would have worked...
a, b = swap(a, b)
fmt.Println(a, b)
}
To embed this program on your website, copy the following code and paste it into your website's HTML: