👾 just add another one missed break line

This commit is contained in:
Lavrentiy Rubtsov 2022-05-14 15:41:37 +06:00 committed by GitHub
parent a85e802056
commit 60209e64d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -746,6 +746,7 @@ These methods are the most used ones, they cover 99% of use cases. But there are
These methods behave sort of like `||` and `&&` operators: if `fn` returns a truthy value, `arr.some()` immediately returns `true` and stops iterating over the rest of items; if `fn` returns a falsy value, `arr.every()` immediately returns `false` and stops iterating over the rest of items as well. These methods behave sort of like `||` and `&&` operators: if `fn` returns a truthy value, `arr.some()` immediately returns `true` and stops iterating over the rest of items; if `fn` returns a falsy value, `arr.every()` immediately returns `false` and stops iterating over the rest of items as well.
We can use `every` to compare arrays: We can use `every` to compare arrays:
```js run ```js run
function arraysEqual(arr1, arr2) { function arraysEqual(arr1, arr2) {
return arr1.length === arr2.length && arr1.every((value, index) => value === arr2[index]); return arr1.length === arr2.length && arr1.every((value, index) => value === arr2[index]);