SinglyLinkedList
Generic types (only for TS):
new SinglyLinkedList()
/**
* Creates an instance of SinglyLinkedList.
*
* @param elements Array of elements to create the new linked list with.
*/
constructor(elements: T[] = [])new SinglyLinkedList([1, 2, 3]);length
/**
* Number of elements in the list.
*
* @readonly
*/
get length(): numberaddAfter()
addFirst()
addLast()
clear()
getAfter()
getFirst()
getLast()
isEmpty()
removeFirst()
replace()
[Symbol.iterator]()
See also
Last updated