# List (Array)

Learn about the List (Array) data type in Notion formulas.

A list data type stores a collection of items which can be accessed and manipulated with other functions. These are typically called arrays in other programming languages and greatly increase the functionality of Notion formulas.

Lists are surrounded by square brackets `[` `]` and can contain strings, numbers, booleans, dates, and other lists.

``````["Apples", "Oranges", "Pears"]

[1, 2, 3]

[true, false, false]

[now(), prop("Date")]

[["Luffy", "Zoro"], ["Nami", "Chopper"]]
```Code language: JavaScript (javascript)```

While lists can be made up of different data types, all non-string items will be converted to strings for the live preview. Their original data types will be retained when accessing each item directly.

``````["Apples", 1, true, now(), ["Luffy", "Zorro"]]
/* Live Preview: "Apples, 1, true, @September 7, 2023 9:00 AM, Luffy, Zorro" */

["Apples", 1, true, now(), ["Luffy", "Zorro"]].at(0)
/* Output: "Apples" */

["Apples", 1, true, now(), ["Luffy", "Zorro"]].at(1)
/* Output: 1 */

["Apples", 1, true, now(), ["Luffy", "Zorro"]].at(2)
/* Output: true */

["Apples", 1, true, now(), ["Luffy", "Zorro"]].at(3)
/* Output: @September 7, 2023 9:00 AM */

["Apples", 1, true, now(), ["Luffy", "Zorro"]].at(4)
/* Output: ["Luffy", "Zorro"] */

```Code language: JavaScript (javascript)```

The introduction of the list data type brings with it 18 new functions!

1. at
2. first
3. last
4. slice
5. concat
6. sort
7. reverse
8. join
9. split
10. unique
11. includes
12. find
13. findIndex
14. filter
15. some
16. every
17. map
18. flat
• current
• index

When using a function like `map` on a list, a list item’s value and its place in the original list can be accessed with `current`and `index` respectively.

``````["Luffy", "Zoro", "Nami", "Chopper"].map(
current
+ " is number "
+ (index + 1)
+ " in the list"
)

/* Output:
Luffy is number 1 in the list,
Zoro is number 2 in the list,
Nami is number 3 in the list,
Chopper is number 4 in the list */

```Code language: JavaScript (javascript)```

My name is Thomas Frank, and I'm a Notion-certified writer, YouTuber, and template creator. I've been using Notion since 2018 to organize my personal life and to run my business and YouTube channel. In addition to this formula reference, I've created a free Notion course for beginners and several productivity-focused Notion templates. If you'd like to connect, follow me on Twitter.

## 🤔 Have an UB Question?

Fill out the form below and I’ll answer as soon as I can! ~Thomas

## 🤔 Have a Question?

Fill out the form below and I’ll answer as soon as I can! ~Thomas