LinkedList

by Kondal Durgam

JavaScript

class linkedListNode{
    constructor(data) {
        this.data = data;
        this.next = null;
    }
}
var head = new linkedListNode(12);
head.next = new linkedListNode(99);
head.next.next = new linkedListNode(33);

let current = head;
while (current !== null) {
	console.log(current.data);
	current = current.next; 
}