摘要:
For server.js, we update the code by using route instance. By using this, we can remove some duplicate code.For example:app.get('/people', function(re... 阅读全文
摘要:
In ES5, we have for ... in:var phones = ["iPhone", "Nexus", "Nokia"];for(i in phones){ console.log(phones[i]);}//iPhone//Nexus//NokiaWhat we get fr... 阅读全文
摘要:
ES6 provides Map, it is a set of k-v pair. Key can be number, string, object, function and even undefined.var m = new Map();Methods:1. set(k,v)m.set("... 阅读全文
摘要:
Es6 provides "Set", it likes array but the data inside should be unqiue."Set" is a construct function, you should call:var s = new Set();Methods:1.add... 阅读全文