0
点赞
收藏
分享

微信扫一扫

github新手用法详解

1 扩展对象

 1)属性的简洁表示法:

   let a = '开始利用简洁'

  let obj = {

        a:a//老旧写法

        a //新写法---属性名和变量名一致,才可以这样写。

    }

   1-1)属性名用法

  如果key为表达式【数组,对象...】

1-2)  方法名称属性:

     1-3) Object.is()

1-4) object.assign()

1-5)object.keys(),object.values(),object.entries()

2 数组的扩展

  2-1)扩展运算符...

2-2) 方法Array.form(),Array.of(),find和findIndex,fill()

        2-2-1 Array.form():把一个看起来类似于数组的对象,转换为真正的数组。

       2-2-2) Array.of():把一组值转换为数组

2-2-3) find和findIndex

2-2-4) fill()

3 数值方法(Number 和 Math)

4 标签模板(``反引号)

5 字符串方法(includes(),startsWith(),endsWith()):

举报

相关推荐

0 条评论