This commit is contained in:
raidenkhan 2024-07-17 10:43:21 +09:00 committed by GitHub
commit 5a7147b83b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,8 +1,9 @@
export default class DoublyLinkedListNode {
constructor(value, next = null, previous = null) {
this.value = value;
this.next = next;
this.previous = previous;
constructor(value, next = null, previous = null) {//create a constructor.
this.value = value;//the this keyword is used to refer to the object being created pretty much like a memory locatin
this.next = next;//this is to store the address of the next node
this.previous = previous;//this is to store the address of the previous node
}
toString(callback) {