From 1f3d3e9c041186a88b1f28c39db9d9f9b050f893 Mon Sep 17 00:00:00 2001 From: Lucas Gabriel Schneider Date: Tue, 21 Jan 2020 19:35:22 +0000 Subject: [PATCH] isContainedIn.md: rewrite descrpition --- snippets/isContainedIn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/isContainedIn.md b/snippets/isContainedIn.md index 1ee3121df..d5b930c9d 100644 --- a/snippets/isContainedIn.md +++ b/snippets/isContainedIn.md @@ -6,7 +6,7 @@ tags: array,intermediate Returns `true` if the elements of the first array are contained in the second one regardless of order, `false` otherwise. Use a `for...of` loop over a `Set` created from the first array. -Use `Array.prototype.some()` to check if all distinct values are contained in the second array, use `Array.prototype.filter()` to compare the amount of occurences of each distinct value in both arrays. +Use `Array.prototype.some()` to check if all distinct values are contained in the second array, use `Array.prototype.filter()` to compare the number of occurrences of each distinct value in both arrays. Return `false` if the count of any element is greater in the first array than the second one, `true` otherwise. ```js