diff --git a/codes/javascript/include/ListNode.js b/codes/javascript/include/ListNode.js index 72306548c..6e226e9c3 100755 --- a/codes/javascript/include/ListNode.js +++ b/codes/javascript/include/ListNode.js @@ -22,7 +22,7 @@ class ListNode { */ arrToLinkedList(arr) { const dum = new ListNode(0); - const head = dum; + let head = dum; for (const val of arr) { head.next = new ListNode(val); head = head.next;