Curriculum Types & methods Nil & zero values exercise 4 · fill-word
Nil & zero values
Type the keyword that represents "no value" for any of Go's nil-able types (pointer, interface, slice, map, channel, function).
TypeScript reference
Fill the blanks →
About this theme
Every type has a zero value — what an uninitialised variable of that type holds. For numbers: 0. For strings: "". For bools: false. For pointers, interfaces, maps, slices, channels, and functions: nil. nil is *not* TypeScript's undefined — it's a typed absence, and conflating "nil pointer" with "nil interface" is one of the classic Go bugs.