摘要: Array.prototype.indexof(value):得到值在数组中的第一个下标 Array.prototype.lastIndexof(value):得到值在数组中的最后一个下标 Array.prototype.foreach(function(item,index){}):遍历数组 Ar 阅读全文
posted @ 2020-02-17 12:52 maycpou 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 1.Object新增一个方法,Object.create();,用来以一个对象为基础创建另一个对象,新建的对象的__proto__指向基础对象 var obj = {name:'maycpou',age:18}; var obj1 = Object.create(obj,{ sex:{//新增一个s 阅读全文
posted @ 2020-02-17 12:32 maycpou 阅读(233) 评论(0) 推荐(0) 编辑