LinkedList<T>.constructor
Overloads
Variant | Definition |
---|---|
new LinkedList(): LinkedList<T> | Create new LinkedList instance |
- // instantiate new linked list without initial set-up const list = new LinkedList();
// instantiate new linked list with initial values const list2 = new LinkedList([1, 2, 3, 4, 5]); | | new LinkedList(initialValue: T[]): LinkedList<T> | Create new LinkedList instance |
new LinkedList(): LinkedList<T>
Create new LinkedList instance
- // instantiate new linked list without initial set-up const list = new LinkedList();
// instantiate new linked list with initial values const list2 = new LinkedList([1, 2, 3, 4, 5]);
new LinkedList(initialValue: T[]): LinkedList<T>
Create new LinkedList instance
Parameters
initialValueT[]
: initial value of LinkedList.