diff --git a/utilities/javascript/binarySearch.js b/utilities/javascript/binarySearch.js index 5861eec7..8a656af0 100644 --- a/utilities/javascript/binarySearch.js +++ b/utilities/javascript/binarySearch.js @@ -2,7 +2,7 @@ function binarySearch(arr, target) { let left = 0; let right = arr.length - 1; while (left <= right) { - let mid = left + Math.floor((right - left) / 2); + const mid = left + Math.floor((right - left) / 2); if (arr[mid] === target) { return mid; }