let 和 var 没有任何区别
let 具有块级作用域,var 没有
var 不可以重新赋值
let 声明的变量是全局变量
箭头函数不能访问 this
箭头函数没有自己的 this,它继承外层作用域的 this
箭头函数不支持参数
箭头函数更慢
function => (a, b) { return a + b }
(a, b) => return a + b
(a, b) => { return a + b }
a, b => a + b
let {name = "Tom"} = person
let name = {person.name}
let [name, age] = person.name, person.age
let name, age = person
Promise 是同步执行的
Promise 只有 .then(),没有 .catch()
Promise 表示一个未来可能完成或失败的异步操作
Promise 一旦被创建就立即处于 resolved 状态
Class 的定义与继承机制
本文深入浅出地讲解 ES6 中的 Class 类,让前端小白轻松掌握面向对象编程技巧。
什么是数据结构和算法?
了解数据结构和算法的基本概念,为什么要学习它们,以及如何在 JavaScript 中应用它们。
On this page