Menu
Coddy logo textTech

What are Lists?

Part of the Fundamentals section of Coddy's Dart journey — lesson 48 of 94.

Lists in Dart are ordered collections that store multiple values of the same or different types. They're like containers that hold items in a specific sequence.

Create a simple list of integers:

void main() {
  List numbers = [1, 2, 3, 4, 5];
  print(numbers);
}

After executing the above code, the output will be:

[1, 2, 3, 4, 5]

Cheat sheet

Lists in Dart are ordered collections that store multiple values:

List numbers = [1, 2, 3, 4, 5];
print(numbers); // Output: [1, 2, 3, 4, 5]

Try it yourself

This lesson doesn't include a code challenge.

quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Fundamentals