Created
May 31, 2021 18:39
-
-
Save appoll/17ca374f7aded4a35de69d6be657e495 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Work with functions that take as parameters arrays (one or more) | |
// E3. Write a function that returns the sum of all elements in an array | |
function addArrayElements(array){ | |
return sum; // number | |
} | |
// E3.a Modify the function to only return the sum of all even elements; | |
// E4. Write a function that returns boolean true if an array contains a specific number (also given as parameter) | |
function containsElement(array, number){ | |
// returns boolean | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment