class LinkedList {
constructor(head = null) {
this.head = head
}
}
class ListNode {
constructor(value,next=null){
this.value = value;
this.next = next;
};
}
let node1 = new ListNode(2);
let node2 = new ListNode(4);
node1.next = node2;
let list = new LinkedList(node1);
console.log(list.head.next);