From 60209e64d9c28620189ed5f473af9c5ce694dd8f Mon Sep 17 00:00:00 2001 From: Lavrentiy Rubtsov Date: Sat, 14 May 2022 15:41:37 +0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=BE=20just=20add=20another=20one=20mis?= =?UTF-8?q?sed=20break=20line?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1-js/05-data-types/05-array-methods/article.md | 1 + 1 file changed, 1 insertion(+) diff --git a/1-js/05-data-types/05-array-methods/article.md b/1-js/05-data-types/05-array-methods/article.md index 673a1895..959c5921 100644 --- a/1-js/05-data-types/05-array-methods/article.md +++ b/1-js/05-data-types/05-array-methods/article.md @@ -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. We can use `every` to compare arrays: + ```js run function arraysEqual(arr1, arr2) { return arr1.length === arr2.length && arr1.every((value, index) => value === arr2[index]);