Typo fixes

This commit is contained in:
va-z 2019-09-23 20:27:14 +05:00 committed by GitHub
parent 4d654318cc
commit 8f0476079c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,7 +169,7 @@ alert( arr.concat([3, 4], [5, 6])); // 1,2,3,4,5,6
alert( arr.concat([3, 4], 5, 6)); // 1,2,3,4,5,6
```
Normally, it only copies elements from arrays. Other objects, even if they look like arrays, added as a whole:
Normally, it only copies elements from arrays. Other objects, even if they look like arrays, are added as a whole:
```js run
let arr = [1, 2];
@ -183,7 +183,7 @@ alert( arr.concat(arrayLike) ); // 1,2,[object Object]
//[1, 2, arrayLike]
```
...But if an array-like object has a special property `Symbol.isConcatSpreadable` property, the it's treated as array by `concat`: its elements are added instead:
...But if an array-like object has a special `Symbol.isConcatSpreadable` property, then it's treated as an array by `concat`: its elements are added instead:
```js run
let arr = [1, 2];