Kodewick
Start learning →
Starter←→0 / 70

Shopping list

#007StarterOutputSlices2 min

A quick look at the list before the supermarket. Use fmt.Printf with %v to show List: [milk eggs apples]; the part in brackets is the slice items, so there's no need to write each item out.

Should show
List: [milk eggs apples]
main.go
package main

import "fmt"

func main() {
	items := []string{"milk", "eggs", "apples"}
	// your code here: fmt.Printf with %v for List: and items, then a newline
}
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.