Created
December 31, 2020 09:29
-
-
Save dharnnie/431aed49fc785429b5b1e1de1d0960a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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