// 10个最佳ES6特性
// 1. 函数参数默认值
// 2. 模板字符串
let name = `Your name is ${first} ${last}.`
// 3. 多行字符串
// 4. 解构赋值
let { house, mouse} = $('body').data()
// 5. 对象属性简写
// 6. 箭头函数
// 7. Promise
// 8. Let与Const
// 9. 类
class Point
{
constructor(x, y)
{
this.x = x;
this.y = y;
}
add()
{
return this.x + this.y;
}
}
var p = new Point(1, 2);
console.log(p.add()); // 输出3
// 10. 模块化
export var a = '模块化'