/arrays

Primary LanguageJavaScript

Helio Training v1.0.0


js-standard-style

Boilerplate

Basic example exercise for the new platform. Make sure you're using the new application when running the below commands.

Instructions

# Install dependencies
yarn

# Test the application
yarn test

Coding Exercise

  1. Using the senators array of data, perform the following filters, paste your filter code alongside each type of filter:
    1. By Party
      1. Republicans
      2. Democrats
      3. Independents
    2. Gender
      1. Male
      2. Female
    3. State
  2. Map the array to format each object to look like this:
      { firstName: '', lastName: '', party: '', gender: ''}
  3. Find the senator from your birth state, and reduce your array to pull the most senior senator. Paste the filter, and reduce function here: (code)