-
Notifications
You must be signed in to change notification settings - Fork 9
/
crewInfo.js
36 lines (32 loc) · 1.09 KB
/
crewInfo.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
1. Using for...in, iterate through the spaceship.crew object in the code editor and console.log() a list
of crew roles and names in the following format:
'[crew member's role]: [crew member's name]', e.g.,'chief officer: Dan'.
2. Using for...in, iterate through the spaceship.crew object in the code editor and console.log() a list of
crew names and degrees in the following format:
'[crew member's name]: [crew member's degree]', i.e.,'Lily: Computer Engineering'.
*/
let spaceship = {
crew: {
captain: {
name: 'Lily',
degree: 'Computer Engineering',
cheerTeam() { console.log('You got this!') }
},
'chief officer': {
name: 'Dan',
degree: 'Aerospace Engineering',
agree() { console.log('I agree, captain!') }
},
medic: {
name: 'Clementine',
degree: 'Physics',
announce() { console.log(`Jets on!`) } },
translator: {
name: 'Shauna',
degree: 'Conservation Science',
powerFuel() { console.log('The tank is full!') }
}
}
};
// Write your code below