This is from my current udacity course. I've tried several answers all seem to fail. I've used dot notation and bracket notation. Even tried to mix them up. Tried to console.log() them. Tried a while loop. I've looked up several pages on here and on MDV that talk about dot/bracket notation. Either there's a registry error or I'm still doing something wrong.
I'm not looking for a flat out answer as much as I am looking for someone to "explain like I'm five" what I am doing wrong and how I can do it correctly.
Reading Nested Objects Write an expression that outputs how to say hello in Portuguese:
const greetings = {
hello: [{
english: 'hi',
french: 'bonjour',
portuguese: 'oi'
}],
goodbye: [{
english: 'bye',
french: 'au revoir',
portuguese: 'tchau'
}]
};
greetings.hello.portuguese;
greetings['hello']['portuguese'];
greetings['hello'][2];
These are kind of what I figure would be correct, though they aren't accepted.