What is a List (Array)?
A Variable holds only a single value at a time (like score = 100). But what if you want to store a player's entire inventory of 10 items, or a leaderboard of top 5 high scores? That's where a List (also called an Array in computer programming) comes in!
Variable vs List
A variable is like a small box holding one item. A list is like a shelf with multiple numbered slots!
1-Based Indexing
Scratch lists start numbering at position 1. The top item is item (1), the second is item (2), and so on.
Real-Life Examples
Shopping lists, todo lists, contact lists in a smartphone, and playlists on Spotify.
Game Applications
RPG inventories, high score leaderboards, dialogue logs, and random word generators.
๐ก Pro Tip: Where to find Lists in Scratch
Interactive List Inspector
Length: 3Quick Add:
๐ก Key Concept: 1-Based Indexing
item (1) of [list].