Numeric types are sized (int8..int64, uint, float64, complex). Declared variables are always initialised: 0 for numbers, "" for strings, false for bools and nil for pointers, slices, maps, channels and interfaces. This removes undefined state.
← Go theorytheory 0/50 · 0%
Fundamentals · easy
4. Basic Types and Zero Values
Every type has a usable zero value.
Check your understanding
1. Zero value of a string is…
2. Zero value of a map is…