Complying with JavaScript Standard Style (npx standard --fix).

This commit is contained in:
Eric Lavault
2021-10-11 15:49:24 +02:00
parent 87a3da7e37
commit df4a783b06
22 changed files with 28 additions and 42 deletions

View File

@@ -49,7 +49,7 @@ function binarySearchIterative (arr, x, low = 0, high = arr.length - 1) {
return -1
}
export { binarySearchIterative, binarySearchRecursive}
export { binarySearchIterative, binarySearchRecursive }
/* ---------------------------------- Test ---------------------------------- */

View File

@@ -47,7 +47,7 @@ function exponentialSearch (arr, length, value) {
return binarySearch(arr, value, i / 2, Math.min(i, length))
}
export { binarySearch, exponentialSearch}
export { binarySearch, exponentialSearch }
// const arr = [2, 3, 4, 10, 40, 65, 78, 100]
// const value = 78

View File

@@ -8,8 +8,7 @@ function SearchArray (searchNum, ar, output = v => console.log(v)) {
const position = Search(ar, searchNum)
if (position !== -1) {
output('The element was found at ' + (position + 1))
}
else {
} else {
output('The element not found')
}
}