Merge pull request #380 from brentguf/array-methods

Typo Array Methods chapter
This commit is contained in:
Ilya Kantor 2018-03-03 09:35:53 +03:00 committed by GitHub
commit 5dcdbc3c73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -229,7 +229,7 @@ Note that the methods use `===` comparison. So, if we look for `false`, it finds
If we want to check for inclusion, and don't want to know the exact index, then `arr.includes` is preferred. If we want to check for inclusion, and don't want to know the exact index, then `arr.includes` is preferred.
Also, a very minor difference of `include` is that it correctly handles `NaN`, unlike `indexOf/lastIndexOf`: Also, a very minor difference of `includes` is that it correctly handles `NaN`, unlike `indexOf/lastIndexOf`:
```js run ```js run
const arr = [NaN]; const arr = [NaN];