When defining a variable with a complex type, which keyword allows you to define a flexible schema where keys are strings and values are a specific type?
Trap 1: object
object is for fixed schemas with known keys.
Trap 2: list
list is for ordered sequences of a single type.
Trap 3: tuple
tuple is for ordered lists of fixed types.
- A
map
map is for arbitrary keys with consistent value types.
- B
object
Why wrong: object is for fixed schemas with known keys.
- C
list
Why wrong: list is for ordered sequences of a single type.
- D
tuple
Why wrong: tuple is for ordered lists of fixed types.