es6新特性

变量--------------------------

let

const:必须直接给一个变量赋值。注意,对象的属性或数组成员还是可以改变的。

const MY_OBJECT = {some: 1};

MY_OBJECT.some = 'body'; // Cool

箭头函数:=>

字符串------------------------

方法:startsWith(),endsWith(),includes(),repeat()

模板字符串:${...}

数组---------------------------

Array.from():从类数组和可遍历对象中创建 Array 的实例。

Array.of():

array1.find()

array1.findIndex()

array1.fill()

Math------------------------

Math.sign 返回数字的符号,结果为 1、-1 或 0

Math.trunc 返回无小数位的数字

Math.cbrt 返回数字的立方根

扩展操作符(...)------------------------

解构 ------------------------

参数-------------------------------

可以定义函数的参数默认值

REST剩余参数

模块-----------------------------

posted on 2016-07-04 23:47  cag2050  阅读(266)  评论(0编辑  收藏  举报

导航