From df05d6846a856ded638406bae0b863ade6413626 Mon Sep 17 00:00:00 2001 From: MaurĂ­cio Antunes Date: Mon, 28 Nov 2022 11:24:17 -0300 Subject: feat: new map exercise --- exercises/maps/maps1/main.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 exercises/maps/maps1/main.go (limited to 'exercises/maps/maps1/main.go') diff --git a/exercises/maps/maps1/main.go b/exercises/maps/maps1/main.go new file mode 100644 index 0000000..7532d4b --- /dev/null +++ b/exercises/maps/maps1/main.go @@ -0,0 +1,16 @@ +// maps1 +// Make me compile! +// +// I AM NOT DONE +// +package main + +func main() { + // Map with people names and their ages + m := make(map) + + m["John"] = 30 + m["Ana"] = 21 + + fmt.Printf("John is %d and Ana is %d", m[], m[]) +} -- cgit v1.2.3-70-g09d2