摘要: 冒泡排序 const bubbleSort = (arr) => { for (let i = 0; i < arr.length; i++) { for (let j = i; j < arr.length; j++) { if (arr[j] < arr[i]) { let cur = arr[ 阅读全文
posted @ 2021-09-02 18:02 dropInInt 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 自定义call方法 Function.prototype.myCall = function (context) { if (typeof this !== 'function'){ throw new TypeError(`${context} is not a function`) } cont 阅读全文
posted @ 2021-09-02 17:08 dropInInt 阅读(30) 评论(0) 推荐(0) 编辑