Created
October 7, 2020 08:28
-
-
Save brandonweis/ad28aed04dd8c89043d232683660f224 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
# Coding exercise | |
Implement the array reduce function (including tests) | |
var arr1 = [1,2,3,4]; | |
arr1.reduce((acc, value) => acc + value, 0); // 10 | |
Extension: avoid using loops (use recursion) | |
*/ | |
/* | |
# Intersection value between two arrays | |
e.g. intersection([1,2,3,4], [0,2,4,6]) → [2,4] | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment