Question: Given the following object: const artistInfo = { name: Talking Heads, genre: New Wave, origin: New York City, members: [ { firstName: David, lastName: Byrne,
Given the following object:
const artistInfo
name: "Talking Heads",
genre: "New Wave",
origin: "New York City",
members:
firstName: "David",
lastName: "Byrne",
instruments: main: "Vocals", secondary: "Guitar"
firstName: "Chris", lastName: "Frantz", instruments: main: "Drums"
firstName: "Tina", lastName: "Weymouth", instruments: main: "Bass"
firstName: "Jerry",
lastName: "Harrison",
instruments: main: "Keyboards", secondary: "Guitar"
;
What code would I need to write to access the band's origin?
I don't know.
artistInfo.origin;
artistInfoNew York City";
Try again! In order to get the value 'New York City', we need to use its key or property accessor
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
