Skip to content

Latest commit

 

History

History
13 lines (12 loc) · 675 Bytes

ex_142.md

File metadata and controls

13 lines (12 loc) · 675 Bytes

Exercise 142

  • Create a new index142.js
  • Define a firstPerson variable
  • Define a secondPerson variable
  • Assign a new array to each defined variable with the following structure
    • The first item is the person first name (string)
    • The second item is the person last name (string)
    • The third item is the person address (string)
    • The fourth item is the person age (number)
  • Use the reduce function over the firstPerson & secondPerson to get a string value back from each of them
  • Compare the strings result to see if they are the same person (if they are they should match)
  • Try using the same person (with different variables) and also try different people