Step 11 of 15 · E · Locking the type
Right type? Welcome
score=250
999
Let's try with the right type this time.
Step 1 / 8idle
When the value matches the type, the box opens up and welcomes it in.
The type does not care which number, only that it is a number — 7, 100, or 9.99 all fit.
You can swap a number for another number all day long — the type is happy as long as the family is right.
Think of the type as a contract: "I will hold this kind of value, and only this kind."
When the contract is kept, the program can trust the contents without checking every single time.
Your job, when making a box, is simple — pick the type that matches the family of value it will hold.
Prices → number. Names → text. Yes/no questions → yes/no. Line-ups of items → list.
Check yourself
Match the pairs
Pick the right **type** for each piece of data:
