Skip to content
On this page

LinkedList<T>.constructor

Overloads

VariantDefinition
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.