2018-04-09 12:15:28 +03:00

11 lines
216 B
JavaScript

export default class LinkedListNode {
constructor(value, next = null) {
this.value = value;
this.next = next;
}
toString(callback) {
return callback ? callback(this.value) : `${this.value}`;
}
}