china-liji

Results 6 issues of china-liji

如: ```js ```

新功能

如: ```js class A { b; c; }; ```

新功能

效果源码,以 `Vue` 举例: 老式语法: ```js let car = new Vue({ el: '#el', data: { color: "red", type: "audi" }, methods: { setColor(color){ this.color = color; }, setType(type){ this.type = type;...

新功能

如: ```js function a(x, y, z){ b(..?arguments); }; a(1, 2, 3, 4, 5); ``` 使用固定搭配:`..?arguments`,可将当前已命名的函数的参数,传递到另一个函数, 所以 `b` 函数收到的参数应该为 `1, 2, 3`。 该表达式的目的是,因为 `b.apply(this, c)`,如果传递的 `c` 不是 `Array`,那么会多一个转换过程,这个过程会消耗性能(对于目前最高 `72` 版本的 `Chrome`)。

新功能

有一些未捕获的标签,没有进行排序。 如`argumentNameContextTags`里的`CommonTag`与`CloseParenTag`没有排在前面。

高质量

```js var obj = { a: { b: {} } }; var value = a.b.c.d.e.f; ``` 按道理 `value`获取时会报错,但很多情况下,我们需要一层层去判断是否存在,再进行下一层属性获取,这样比较麻烦。 试使用新语法来避免报错,直接返回`undefined`。

新功能