Node
Last updated
Was this helpful?
Last updated
Was this helpful?
A Node
represents an element in a linked structure, such as a .
It contains a single, immutable property: value: T
.
A StackNode exposes a next?: Node<T>
property that allows you to add a reference to another node, creating a singly-linked list.
With these nodes, you could traverse the nodes like this: