0PricingLogin
Dart Academy · Lesson

Creating Lists and Indexing

Build lists and access items by position.

What a List Is

A List is an ordered bucket of values you can hold in one variable. Think of it as a numbered row of boxes, each storing one item. 📦

Your First List

Write a list with square brackets and commas. The literal below holds three fruit names in the exact order you typed them.

var fruits = ['apple', 'banana', 'cherry'];

All lessons in this course

  1. Creating Lists and Indexing
  2. Adding, Removing, and Updating Items
  3. Searching and Sorting Lists
  4. Transforming With map, where, and toList
← Back to Dart Academy