List Flashcards

1
Q

Definition

A

An array containing a list of items that can grow or shrink.

var mylist = [1,2,3,4];
print(mylist[0]);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Empty List

A

var emptyList = [];

emptyList.add(56);

emptyList.addAll([1,2,3]);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Add at Position

A

var myList = [];

myList.insert(index, value);

myList.insertAll(index, [1,2,3]);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Remove Elements

A

myList.removeAt(index);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly