Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9797a43

Browse files
author
10kartik
committed
Review changes on constructor's loop
1 parent 7ccde3f commit 9797a43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎Data-Structures/Linked-List/SinglyLinkedList.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ class LinkedList {
2121
this.length = 0
2222

2323
if (listOfValues instanceof Array) {
24-
for (leti=0;i<listOfValues.length;i++) {
25-
this.addLast(listOfValues[i])
24+
for (constvalueoflistOfValues) {
25+
this.addLast(value)
2626
}
2727
}
2828
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /