Last active
March 12, 2021 13:14
-
-
Save richlloydmiles/a83a3ffc24dea92d4efafbdaa905d904 to your computer and use it in GitHub Desktop.
Question 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const people = { | |
adrian: { | |
age: 21, | |
department: 'design' | |
}, | |
emma: { | |
age: 15, | |
department: 'development' | |
}, | |
rachael: { | |
age: 18, | |
department: 'design' | |
}, | |
john: { | |
age: 31, | |
department: 'development', | |
dependents: { | |
sven: { | |
age: 23, | |
department: 'design' | |
}, | |
michael: { | |
age: 29, | |
department: 'development', | |
dependents: { | |
sharon: { | |
age: 20, | |
department: 'development' | |
} | |
} | |
} | |
} | |
} | |
} | |
// names of all the people and dependents with an age less than 30 who are in the development department as an array | |
// should output [ 'emma', 'michael', 'sharon' ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment