Guest User

Untitled

a guest
Jun 24th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. /*
  2. prepend(): Prepend a new Node Object to the beginning of the LinkedList
  3. */
  4. LinkedList.prototype.prepend = function(data) {
  5. let newNode = new Node(data);
  6. newNode.next = this.head;
  7. this.head = newNode;
  8. }
Add Comment
Please, Sign In to add comment