-
Notifications
You must be signed in to change notification settings - Fork 634
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
es6 及 es6+ 的能力集,你最常用的,这其中最有用的,都解决了什么问题 #147
Comments
常用的比如展开符、promise、解构赋值、object和数组都拓展了一些方法。 |
我最常用的ES6 的特性是使用最多的,包括类、模块化、箭头函数、函数参数默认值、模板字符串、解构赋值、延展操作符、Promise、let 与 const等等,这部分已经是开发必备了,没什么好说的 另外还有:
最有用的ES6 的特性都很有用,ES7-ES11中,我比较感兴趣的是:
其中,async/await 异步终极解决方案, 下面列一下所有的特性,查漏补缺 ES6(ES2015)
具体不再冗余介绍,这个属于前端基础 ES7(ES2016)
Array.prototype.includes()[1, 2].includes(1) // true 指数操作符2**5 // 32 ES8(ES2017)
async/await异步终极解决方案 async getInfo(){
const res = await api.getData()
// ...
} Object.values()Object.values({a: 1, b: 2, c: 3})
// [1, 2, 3] Object.entries()Object.values({a: 1, b: 2, c: 3})
// [["a", 1], ["b", 2], ["c", 3]] String padding:
|
No description provided.
The text was updated successfully, but these errors were encountered: