Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions 00_A$AP Learn 🚀/02_Core Datatypes/08_The Slice Type/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,7 @@ import (
// NB: Across these examples, we frequently use the built-in `len(something)` function,
// that gives us the number of elements in our array, map, or slice

func main() {
colorsMap := map[string]string{
"AliceBlue": "#F0F8FF",
"AntiqueWhite": "#FAEBD7",
"Aqua": "#00FFFF",
"Aquamarine": "#7FFFD4",
"Azure": "#F0FFFF",
"Red": "#FF0000",
"Green": "#008000",
"Blue": "#0000FF",
"Yellow": "#FFFF00",
"White": "#FFFFFF",
}

func main() {
// We use `make` to create an empty slice of our desired type, length, and, optionally, capacity
// NB: Below, 0 is the length of our slice, and 10 is the capacity. This means that Go
// will allocate memory for 10 elements and `append()` will be a cheap operation until we exceed
Expand Down