- largestEl takes an array and returns the largest element.
- reversed takes a string and reverses it.
- loudSnakeCase takes a full sentence and puts it into “Loud_Snake_Case” format but strips out any non-character elements (like punctuation).
- fizzBuzz takes an input of a number and returns an array containing all the elements from 1 to that number. Each element divisible by 3 is replaced by “FIZZ”, each element divisible by 5 is replaced by “BUZZ” and each element divisible by both 3 and 5 is replaced by “FIZZBUZZ”. Eg. fizzBuzz(6) => [ 1, 2, “FIZZ”, 4, “BUZZ”, “FIZZ” ]
- compareArrays takes two arrays and checks to see if they are equal (same contents in the same order). Assume they’re not nested.
- myMap takes an array and a function. It passes every element from the array into that function, in turn, running the function. The returned array should be filled with each of the return statements from that function.
- primes takes a number and outputs an array containing all prime numbers that occur prior to that number, e.g. primes(8) => [2,3,5,7]