class Node {
constructor(value) {
this.value = value
this.next = undefined
}
}
class LinkedList {
constructor() {
this.head = null
this.count = 0
}
push(value) {
const node = new Node(value)
if (!this.head) {
this.head = node
} else {
current = this.head
while(current.next != null) {
current = current.next
}
current.next = node
}
}
}