摘要: 1.箭头函数没有 this,所以需要通过查找作用域链来确定 this 的值。箭头函数没有this,不能使用call(), apply(), bind()改变this; 2.没有arguments,访问外围函数的arguments function constant () { return () => 阅读全文
posted @ 2018-11-09 18:09 胖糖糖爱吃肉 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 1.定义:类似于数组,成员的值都是唯一的。 2.属性和方法 add(value) / delete(value) / has(value) / clear() 遍历方法:keys() / values() / entries() / forEach()。keys()、values()、entries 阅读全文
posted @ 2018-11-09 17:31 胖糖糖爱吃肉 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 1.Map的学习 a.Map的定义:“值-值”,更完善的Hash结构; const m = new Map() const o = { p: 'hello Map' } m.set(o, 'content') const m = new Map(o) b.Map的实例属性与操作方法 map.size 阅读全文
posted @ 2018-11-09 16:36 胖糖糖爱吃肉 阅读(892) 评论(0) 推荐(0) 编辑