摘要:
const arr1 = [1,4,5,8,12,16,18] function binarySearch(arr, num) { let len = arr.length let leftIndex = 0 let rightIndex = len - 1 while(leftIndex <= r 阅读全文
摘要:
Array.prototype.my_reduce = function(callBack, initValue) { if (typeof callBack !== 'function') { // 方法错误处理 throw new Error(`${callBack} is not a func 阅读全文