Iterables return an iterator object. This object knows how to access items from a collection 1 at a time, while keeping track of its current position ...
分类:
其他好文 时间:
2016-01-14 22:21:04
阅读次数:
182
Example 1:function *topicList(){ yield "ES2015"; yield "Semi-colons: good or bad?"; yield "TypeScript";}for( let topic of topicList() ){ console.l...
分类:
其他好文 时间:
2016-01-14 22:19:06
阅读次数:
244
Export variable:export const MAX_USERS = 3;export const MAX_REPLIES = 3;Export default class:export default class FlashMessage { constructor(message)....
分类:
其他好文 时间:
2016-01-14 22:13:41
阅读次数:
176
In constructor, you can call parent's constuctor() method by supert();class ShoppingCart { constructor(userId){ this.userId = userId; this.prod...
分类:
其他好文 时间:
2016-01-14 21:02:20
阅读次数:
159
WeakMap: is a type of Map where only objects can be passed as keys. Primitive data type -- such are string, numbers, booleans, etc --- are not allowed...
分类:
其他好文 时间:
2016-01-14 06:20:12
阅读次数:
215
Use Maps when keys are unknown until runtime:Map:let recentPosts = new Map();createPost( newPost, (data)=>{ // Key unknown until runtime, so use Ma...
分类:
其他好文 时间:
2016-01-14 06:15:21
阅读次数:
152
Map is really useful when you want to use object as a key to set vaule, in ES5, you cannot really use object as a key:var user1 = { name: "Wan", age.....
分类:
其他好文 时间:
2016-01-13 07:02:39
阅读次数:
245
ECMAScript6 是最新的ECMAScript标准,于2015年6月正式推出(所以也称为ECMAScript 2015),相比于2009年推出的es5, es6定义了更加丰富的语言特性,基于该标准的Javascript语言也迎来了语法上的重大变革。本文列举了部分es6新特性,希望之前没接触es...
分类:
其他好文 时间:
2016-01-12 15:05:36
阅读次数:
252
1.cdn文章2.https文章3.前端性能指标计算方式、监测平台4.node性能监测5.es5、es6主题6.xss分享7.性能优化8.css布局9.nginx10.行业相关技术调研11.移动端性能问题12.移动端开发相关规范。如1px问题13.响应式设计14.图书管理平台,方便借书15.sess...
分类:
其他好文 时间:
2016-01-12 11:25:42
阅读次数:
118
readline用于创建一个从stream读取数据的接口VM提供了在应用中执行脚本的能力vm+readline 实现各简单的js执行命令行工具开发环境 : Node4.2.4 , 用了ES6 arrow function /let/const调试cmder'use strict'const read...
分类:
其他好文 时间:
2016-01-08 23:25:37
阅读次数:
244