增加内容

This commit is contained in:
ruanyf
2014-08-29 01:51:37 +08:00
parent d814b273c8
commit 08aa66f021
9 changed files with 113 additions and 10 deletions
+2
View File
@@ -186,6 +186,8 @@ add(...numbers) // 42
```
上面代码中,`array.push(...items)``add(...numbers)`这两行,都是函数的调用,它们的都使用了扩展运算符。该运算符将一个数组,变为参数序列。
扩展运算符可以简化求出一个数组最大元素的写法。
```javascript