This exercise will provide examples of code you can use to accomplish common tasks with array items.
- Create an array with some values, add empty values into the array items.
- Using the filter method then remove the duplicates in as few lines of code as possible.
- Provide several ways to loop through the items of the array and output the values into the console.
- make updates to the array, add new items to the beginning and end.
- Remove the first and last items from the array list
- Using Map create a new array from a previous array
- Try the callback within the map to add more functionality to the block of code.
- Create several additional arrays
- Join them together
- Duplicate the array contents to a new array.
- Use the entries() method to create an iterator object of the array contents, output the results in the console.
- Create new arrays using the filter to only add selected items by condition.
- Check for values within the array, get the index value of the first occurrence, last occurrence, and the boolean result if it exists.