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 dd2c796

Browse files
Update index.js
'var's are replaced with 'let's.
1 parent 7646ad0 commit dd2c796

File tree

1 file changed

+4
-4
lines changed
  • src/_DataStructures_/LinkedList/reverse-linked-list

1 file changed

+4
-4
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function reverseLinkedList(linkedList) {
2-
var next = linkedList.getFirst();
3-
var current = null;
4-
var prev;
2+
let next = linkedList.getFirst();
3+
let current = null;
4+
let prev;
55
while(next != null){
66
prev = current;
77
current = next;
@@ -12,4 +12,4 @@ function reverseLinkedList(linkedList) {
1212
};
1313
module.exports = {
1414
reverseLinkedList,
15-
};
15+
};

0 commit comments

Comments
(0)

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