File tree 1 file changed +1
-3
lines changed
1-js/05-data-types/05-array-methods
1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ alert( arr.includes(1) ); // true
255
255
256
256
Please note that ` indexOf ` uses the strict equality ` === ` for comparison. So, if we look for ` false ` , it finds exactly ` false ` and not the zero.
257
257
258
- If we want to check if ` item ` exists in the array, and don't need the exact index, then ` arr.includes ` is preferred.
258
+ If we want to check if ` item ` exists in the array, and don't need the index, then ` arr.includes ` is preferred.
259
259
260
260
The method [ arr.lastIndexOf] ( mdn:js/Array/lastIndexOf ) is the same as ` indexOf ` , but looks for from right to left.
261
261
@@ -338,8 +338,6 @@ alert(users.findIndex(user => user.name == 'John')); // 0
338
338
alert(users.findLastIndex(user => user.name == 'John')); // 3
339
339
```
340
340
341
-
342
-
343
341
### filter
344
342
345
343
The `find` method looks for a single (first) element that makes the function return `true`.
You can’t perform that action at this time.
0 commit comments