摘要:
一、prototype 在JavaScript中,每个函数都有一个prototype属性,这个属性指向函数的原型对象。 例如: function Person(age) { this.age = age } Person.prototype.name = 'kavin' var person1 = 阅读全文
摘要:
1、map方法的封装 Array.prototype.mapAlley = function(callback){ //获取调用mapAlley这个方法的数组 let arr = this; //获取this的指向,如果传递了就获取arguments中的第一个值 没有不存在则this仍然指向win 阅读全文