From f75e20a969c19714a2fb87578f00ce5b8a7d843d Mon Sep 17 00:00:00 2001 From: Nilys <51754890+nilys@users.noreply.github.com> Date: Mon, 8 Jul 2019 02:05:02 +0200 Subject: [PATCH] Delete redundant solution (#36393) The first advanced solution is almost identical to the intermediate one. Per "similar but better" rule, I believe the first one should be kept (or at the bare minimum, they should at least fill the same category). --- .../diff-two-arrays/index.md | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/guide/english/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/diff-two-arrays/index.md b/guide/english/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/diff-two-arrays/index.md index 4c7c2b9276..bed0967db9 100644 --- a/guide/english/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/diff-two-arrays/index.md +++ b/guide/english/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/diff-two-arrays/index.md @@ -96,23 +96,6 @@ Explain solution here and add any relevant links * Array.prototype.includes (Devdocs) ## ![:rotating_light:](https://forum.freecodecamp.com/images/emoji/emoji_one/rotating_light.png?v=3 ":rotating_light:") Advanced Code Solution (Declarative Solution): - - function diffArray(arr1, arr2) { - return arr1 - .filter(el => !arr2.includes(el)) - .concat( - arr2.filter(el => !arr1.includes(el)) - ) - } - - diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]); - - -### Code Explanation: - -Explain solution here and add any relevant links - -## ![:rotating_light:](https://forum.freecodecamp.com/images/emoji/emoji_one/rotating_light.png?v=3 ":rotating_light:") Advanced Code Solution Alternative (Declarative Solution): function diffArray(arr1, arr2) { return [ ...diff(arr1, arr2),