摘要:
Using for..of statement:function* greeting(){ console.log(`Generators are "lazy"`); yield "How"; console.log(`I'm not called until the second... 阅读全文
posted @ 2014-11-23 21:37
Zhentiw
阅读(167)
评论(0)
推荐(0)
摘要:
Generators in ECMAscript 6 are first-class coroutines that produce encapsulated suspended execution(暂停执行) contexts.Yield values and iterate over them ... 阅读全文
posted @ 2014-11-23 21:05
Zhentiw
阅读(376)
评论(0)
推荐(0)
摘要:
The spread operator (...) allows you to "explode" an array into its individual elements.Spreate an array:console.log([1,2,3]); // [1, 2, 3] conso... 阅读全文
posted @ 2014-11-23 01:41
Zhentiw
阅读(466)
评论(0)
推荐(0)
摘要:
Where destructuring in ES6 allows you to easily get properties out of an object, this shorthand property syntax allows you to easily push properties i... 阅读全文
posted @ 2014-11-23 01:30
Zhentiw
阅读(335)
评论(0)
推荐(0)