-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
要不要增加一章,写node4里的es特性? #17
Comments
Node.js 4.0.0 可以让您享受最尖端的技术,保持项目的先进性。其中对 v8 的升级几乎做到了与 Chromium / Google Chrome 同步,达到了 4.5.x,它提供了很多新的语言功能。ECMA-262 是 JavaScript 语言规范的最新版本,而且好多新特性数都是开箱即用的。这些新特性包括:
|
还是应该modern一点,哈哈 |
还要针对场景用好, 不然就写成 es6 入门了。在 koa 下,用最多是 generator ,promise ,另外箭向函数还是慎用,因为 koa 里 上下文 ctx 就是 this,容易走火。希望参考多些例子,总结出最佳实践,避免入坑。 |
感觉不用写那么多es6的内容,主要吧generator和promise以及co写详细就可以了,不然感觉有点偏了。 |
es6的基础东西就不要了。。主要讲generator和promise在koa中的使用就好了。。。fashion..modern |
在学习koa的同时也学习了es6,多好呀,作为小白我支持写 |
第一章的第一节的classes中的setter/getter的例子是错误的 class Polygon{
constructor(height, width){
this.height = height;
this.width = width;
}
get name(){
return this.name;
}
set name(somename){
this.name = somename;
}
} 这里 class Polygon{
constructor(height, width){
this.height = height;
this.width = width;
}
get name(){
return this._name;
}
set name(name){
this._name = name;
}
} 注意到setter和getter的机制,给this.name赋值的时候,就会调用set name @i5ting |
No description provided.
The text was updated successfully, but these errors were encountered: