Array.prototype.my_map = function(fn, context) {
let resArr = []
const me = this
const ctx = context ? context : me // 定义上下文
if (typeof fn !== 'function') {
throw new Error(`${
fn
实现Array.prototype.map
最新推荐文章于 2022-11-17 16:07:31 发布