Remove all the nodes from the LinkedList
Return true or false whether a value is in the LinkedList
Item to locate in the LinkedList
Returns true if the LinkedList has a length of 0 false otherwise.
Creates a new LinkedList with all elements that pass the test implemented by the provided function.
Function is a predicate, to test each element of the LinkedList. Return true to keep the element, false otherwise. It accepts two arguments: item {T} The current item being processed in the array, index {number} The index of the current element being processed in the LinkedList.
A new LinkedList with the elements that pass the test. If no elements pass the test, an empty LinkedList will be returned.
Item to find in the LinkedList
First value in the LinkedList; undefined if not
Executes a provided function once for each LinkedList element.
Function to execute for each element, taking four arguments: node {Node} The current Node, value {T} The current Node value, index {number} The current index in the LinkedList, LinkedList {LinkedList} The LinkedList.
Determines whether an LinkedList includes a certain element, returning true or false as appropriate.
The item to search for.
A boolean which is true if the value searchElement is found within the LinkedList.
Returns the first index at which a given element can be found in the LinkedList, or -1 if it is not present.
Item to locate in the LinkedList.
The first index of the element in the LinkedList; -1 if not found.
Returns the number of nodes of a LinkedList.
Return the item at the beginning of a LinkedList without removing it
Removes the last element from an LinkedList and returns that element
The removed element from the LinkedList; undefined if the LinkedList is empty.
Adds one or more elements to the end of a LinkedList
The elements to add to the end of the LinkedList.
Removes the first instance of an element from the LinkedList
The element to remove from the LinkedList
The removed element from the LinkedList; undefined if the LinkedList is empty.
Removes the first element from an LinkedList
The removed element from the LinkedList
Adds an item to the beginning of a LinkedList.
The elements to add to the beginning of the LinkedList.
The new length upon which the method was called.
Generated using TypeDoc
Return the item at the end of a LinkedList without removing it
the item at the end