UNPKG

387 BJavaScriptView Raw
1export class LinkNode {
2 constructor(value, next = null) {
3 this.value = value;
4 this.next = next;
5 }
6 get Value() {
7 return this.value;
8 }
9 get Next() {
10 return this.next;
11 }
12 setValue(value) {
13 this.value = value;
14 }
15 setNext(node) {
16 this.next = node;
17 }
18 toString() {
19 return `${this.value}`;
20 }
21}