资 源 简 介
Essential Data structures in Javascript
Collection of essential computer science data structures in Javascript. Plus some additional nifty datastructures coming in upcoming versions.
Contains basic data structures
Node (aliases UnaryNode)
A simple node structure consisting of value, and link to next item.
```
var a= new Node();
var b= new Node();
var c= new Node();
a.value(1);
b.value(2);
a.next(b);
b.next(null); // [Optional] This is by default
// Now traverse the nodes using their links
var t= a; // Start with first node
while(t!== null) {
alert(t.value());
t= t.next();
}
``> > Calling value()without any parameters acts like a getter to read values> > Calling next()` behaves in the same way