GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Exponential Search : Fix `'value' is not defined` error . · Algorithms-Learn/JavaScript@90356f3

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Search
    • ExponentialSearch.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Search/ExponentialSearch.js‎

Copy file name to clipboardExpand all lines: Search/ExponentialSearch.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
*
1010
*/
1111

12-
function binarySearch (arr, x, floor, ceiling) {
12+
function binarySearch (arr, value, floor, ceiling) {
1313
// Middle index
1414
const mid = Math.floor((floor + ceiling) / 2)
1515

1616
// If value is at the mid position return this position
17-
if (arr[mid] === x) {
17+
if (arr[mid] === value) {
1818
return mid
1919
}
2020

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.