Align the format of the sentence with the others (#1074)
Align the format of the sentence with the others
This commit is contained in:
commit
7ccf421c5c
1 changed files with 1 additions and 1 deletions
|
@ -238,7 +238,7 @@ These are methods to search for something in an array.
|
|||
|
||||
The methods [arr.indexOf](mdn:js/Array/indexOf), [arr.lastIndexOf](mdn:js/Array/lastIndexOf) and [arr.includes](mdn:js/Array/includes) have the same syntax and do essentially the same as their string counterparts, but operate on items instead of characters:
|
||||
|
||||
- `arr.indexOf(item, from)` looks for `item` starting from index `from`, and returns the index where it was found, otherwise `-1`.
|
||||
- `arr.indexOf(item, from)` -- looks for `item` starting from index `from`, and returns the index where it was found, otherwise `-1`.
|
||||
- `arr.lastIndexOf(item, from)` -- same, but looks for from right to left.
|
||||
- `arr.includes(item, from)` -- looks for `item` starting from index `from`, returns `true` if found.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue