![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
es6
若水鱼
这个作者很懒,什么都没留下…
展开
-
Generator
let tell = function* () { yield 'a'; yield 'b'; return 'c';};let k = tell();console.log(k.next());// {value: 'a',done:false}console.log(k.next());// {value: 'b',done:false}console.log(原创 2017-12-08 12:50:02 · 250 阅读 · 0 评论 -
es6数组扩展笔记
Array.oflet array = Array.of(3,4,7,9,11);console.log('array='+array);//array=[3,4,7,9,11]let empty = Array.of();console.log('empty='+empty);//empty=[]Array.from//将伪数组转化为数组**html**<!DOCTYPE html><h原创 2017-12-07 20:59:55 · 254 阅读 · 0 评论 -
Symbol数据类型
let a1 = Symbol();let a2 = Symbol();console.log(a1 === a2);//falselet a3 = Symbol.for('a3');let a4 = Symbol.for('a3');console.log(a3 === a4);//true原创 2017-12-07 22:05:43 · 229 阅读 · 0 评论