Chapter 11: Lists (Ordered Data Collections)
Manage quiz banks, inventories, high scores, and tile maps cleanly using numbered Scratch lists.
Lesson goal & core concept
Add, delete, replace, search, and loop through every item in a list.
Scratch lists are 1-indexed (item 1 is the first item). Combining a list with an index variable (i) lets 6 blocks process 100 items.
Variable & List Visualizer (1-Indexed Scratch Lists)
Click the Scratch data operations below to watch variables update and see how Scratch 1-indexed list items shift when you add, insert, or delete.
Step-by-step practice
Work through these steps in the Scratch editor, predicting each result before clicking the green flag.
- Create a list and populate 5 items on green flag (after "delete all").
- Read items in order by looping i from 1 to length of list.
- Find the maximum value in a list of numbers.
- Check membership with "<(list) contains (item)?>".
- When green flag clicked
- Delete all of bag
- Add Torch to bag
- Add Compass to bag
- Say (length of bag) for 2 seconds
Try it: Creates a 2-item inventory and reports length 2.
Mini challenge & next steps
Write a loop that calculates the sum of all numbers stored in a "scores" list.
FAQ
How long should I spend on "Chapter 11: Lists (Ordered Data Collections)"?
Aim for 15–20 minutes: read the concept, test the small example, modify one value to see what changes, and try the mini challenge.
This guide is provided for educational purposes. Scratch screens and terms may change over time, so please check the official Scratch website as well.