Skip to content

Instantly share code, notes, and snippets.

@dpzmick
Created October 7, 2014 00:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dpzmick/4f7c138fd2bd6b0731bc to your computer and use it in GitHub Desktop.
Save dpzmick/4f7c138fd2bd6b0731bc to your computer and use it in GitHub Desktop.
function make_node(value) {
return {
value: value,
next: null,
};
}
var first = make_node(1);
var second = make_node(2);
var third = make_node(4);
first.next = second;
second.next = third;
var head = first;
var current = first;
while (current !== null) {
console.log(current.value);
current = current.next;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment