Stub Article
This article needs more information, clarification, or completion.
You can help us by expanding this article. There may be more information on its talk page.


This page is about the data type. For the block category, see Lists (block category).

Lists are data types that can store multiple items of information (such as text, numbers or even another lists) and can have a varying amount of items. Unlike many other data types, trying to assign a list to another variable just gives the same list, meaning modifying one will also affect the other (which is called shallow copy).

There are two ways Snap! render lists. The "list view", shows buttons to modify, add and remove items, and lists appear nested. The "table view", on the other hand, removes the buttons and resembles a table.

Blocks

(list [] @delInput @addInput::list) // Reports a list
(numbers from (1) to (10)::list) //Reports a list consisting of numbers between 1 and 10.