会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
bobo2404
Believe in yourself
导航
博客园
首页
新随笔
联系
订阅
管理
公告
2020年1月21日
generator
摘要: //generator是可以用来控制迭代器的函数,可以暂停,也可以任何时候恢复function * loop () { for(let i = 0; i < 5; i++) { yield console.log(i) } } const l = loop() l.next() l.next() f
阅读全文
posted @ 2020-01-21 22:26 bobo2404
阅读(156)
评论(0)
推荐(0)
编辑
proxy应用场景
摘要: //场景一:可以修改对象的值let o = { name: 'xiaoming', price: 190 } let d = new Proxy(o,{ get (target,key){ if(key 'price'){ return target[key] + 20 }else{ return
阅读全文
posted @ 2020-01-21 16:36 bobo2404
阅读(468)
评论(0)
推荐(0)
编辑