Skip to content

Instantly share code, notes, and snippets.

@dharnnie
Created December 31, 2020 09:29
Show Gist options
  • Save dharnnie/431aed49fc785429b5b1e1de1d0960a7 to your computer and use it in GitHub Desktop.
Save dharnnie/431aed49fc785429b5b1e1de1d0960a7 to your computer and use it in GitHub Desktop.
package main
import "fmt"
func main() {
var childrenNames [3]string
cards := []string{"Ace of Diamonds", newCard()}
cards = append(cards, "Six of Spades")
for i, card := range cards {
fmt.Println(i, card)
}
}
func newCard() string {
return "Five of Hearts"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment