Skip to content

Commit dd2c796

Browse files
authored
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
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)