Quiz Entry - updated: 2026.07.30
What is a mapping in Solidity?
A key-to-value store, declared mapping(KeyType => ValueType) — like a hash table or dictionary that jumps straight to a value by its key.
Because Solidity has no null, every possible key already "exists" holding the value type's zero value, so a lookup on a never-set key returns 0 rather than an error. Mappings can't be iterated or report their length.