- Print blue and 1996 to the screen using object destructuring
const car = {
colour: 'blue',
brand: 'ford',
gears: 4,
year: '1996',
manual: true
}
- Make the code below run (with object destructuring), you need to reassign the languages key to a new name
const school = {
name: 'Coder Academy',
students: 36,
address: '120 Spencer Street',
languages: [
'Ruby',
'JavaScript'
]
}
console.log(programmingLanguages)
- Print Melbourne and 36 to the screen using object destructuring
const schools = {
name: 'Coder Academy',
languages: [
'Ruby',
'JavaScript'
],
cities: [
{
name: 'Melbourne',
address: '120 Spencer Street',
students: 36
},
{
name: 'Sydney',
address: '1 Martin Place',
students: 30
}
]
}
- Make the code below run (with object destructuring), we want to print Monica Seles' US Open wins to the screen
const sport = {
name: 'Tennis',
number_of_players: [
{
type: 'singles',
players: 2
},
{
type: 'doubles',
players: 4
}
],
key_players: [
{
type: 'female',
players: [
{
name: 'Steffi Graf',
total_majors: 22,
slam_breakdown: {
aus_open: [1988, 1989, 1990, 1994],
roland_garros: [1987, 1988, 1993, 1995, 1996, 1999],
wimbledon: [1988, 1989, 1991, 1992, 1993, 1995, 1996],
us_open: [1988, 1989, 1993, 1995, 1996]
}
},
{
name: 'Monica Seles',
total_majors: 9,
slam_breakdown: {
aus_open: [1991, 1992, 1993, 1996],
roland_garros: [1990, 1991, 1992],
wimbledon: [],
us_open: [1991, 1992]
}
}
]
}
]
}
console.log(monicaUsOpenWins)