SEW | CORE | JavaScript Array Methods
As a content creator I need an easy to use system to sort an array in lexical order, so that I can created sorted list much faster.
- A function that takes an array of string as a parameter is available.
- The result is an array consisting of the same strings as the input array, only sorted in lexical order
- Hint: take a look at the string method: localeCompare()
As a developer I want to filter an array, so that only even numbers are in the result.
- A function that takes an array of numbers as a parameter is available.
- The result is an array consisting only of even numbers
As a developer I want to filter an array, so that only words starting with capital letters are in the result.
- A function that takes an array of strings as a parameter is available.
- The result is an array consisting only of words that start with a capital letter.
As a mathematician I want to create a function, so that I can easily calculate the modulo of all numbers in an array.
- A function that takes an array of numbers and a value for the modulo calculation as parameters is available.
- The result is an array consisting of the calculated values.
As a sysadmin I want to create a function, so that I can easily create all lower case strings.
- A function that takes an array of strings as a parameter is available.
- The result is an array consisting of all strings converted to lower case.