An item is a part of a list that works in a similar way to a variable. Each list can hold 200,000 items in Scratch 3.0.[1][2]
An item can be any value supported by Scratch, such as a Boolean (true or false), string, or number. An item cannot contain a list in Scratch, though in Snap!, it can. Lists of lists is a powerful way to store data, so there have been suggestions to include lists as a standard data type in Scratch 2.0 or create a new data type called "tables" which work like a spreadsheet.
Definition
An item is a lot like a variable. One can modify, read, and create items. Items of a list can be used to replace all the variables of a project. However it will not be as easy to read, as values will be referred to by numerical indices, not names.
Related Blocks
Nearly all of the List blocks, found beneath the "Make a List" button under the heading "Variables" in the palette, can be used in conjunction with items:
Note: | Click on each block to learn more. |
add () to [ v]
— Adds an item to the bottom of a listdelete () of [ v]
— Removes an item from a listinsert () at () of [ v]
— Adds an item to a list and puts it wherever specifiedreplace item () of [ v] with ()
— Replaces an item's contentitem () of [ v]
— Reports what the item containsitem # of () in [ v]
— Reports the item number of the first item holding the given valuelength of [ v]
— Reports how many items are in a list[ v] contains ()?
— Checks if a list has an item that holds the given value
These blocks give more control over items than other blocks can with variables — there are no blocks that will create or delete variables, except in some Scratch modifications.