Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Review changes on constructor's loop
  • Loading branch information
10kartik committed Sep 19, 2022
commit 9797a43c97e089efda1bfc8c291318574697a718
4 changes: 2 additions & 2 deletions Data-Structures/Linked-List/SinglyLinkedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class LinkedList {
this.length = 0

if (listOfValues instanceof Array) {
for (let i = 0; i < listOfValues.length; i++) {
this.addLast(listOfValues[i])
for (const value of listOfValues) {
this.addLast(value)
}
}
}
Expand Down