mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-28 21:32:20 +00:00
fix Array.prototype.includes() typo
This commit is contained in:
parent
078a0a5f40
commit
3ff90589e6
@ -292,7 +292,7 @@ console.log(entries.next().value); // [2, 'c']
|
|||||||
|
|
||||||
## 数组实例的includes()
|
## 数组实例的includes()
|
||||||
|
|
||||||
`Array.protypeto.includes`方法返回一个布尔值,表示某个数组是否包含给定的值,与字符串的`includes`方法类似。该方法属于ES7,但Babel转码器已经支持。
|
`Array.prototype.includes`方法返回一个布尔值,表示某个数组是否包含给定的值,与字符串的`includes`方法类似。该方法属于ES7,但Babel转码器已经支持。
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
[1, 2, 3].includes(2); // true
|
[1, 2, 3].includes(2); // true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user