Create an npm Package for Binary Search: A simple package to perform binary search on sorted arrays.
npm install binary-search-package-219newbash
npm i binary-search-package-219new
`
Usage
Import the package and use the binarySearch function:
`
const binarySearch = require('binary-search-package-219new');
// Example usage
const sortedArray = [1, 3, 5, 7, 9];
const target = 7;
const index = binarySearch(sortedArray, target);
console.log(index); // Output: 3
``