Add To Head - part 1

https://subscription.packtpub.com/video/programming/9781800206878/p2/video2_3/-add-to-head-part-1

by Dominic Myers

JavaScript

function LinkedList() {
	this.head = null;
  this.tail = null;
}

function Node(value, next, prev) {
	this.value = value;
  this.next = next;
  this.prev = prev;
}

LinkedList.prototype.addToHead = function(value){
	var newNode = new Node(value, this.head, null);
}