Anyone know why this doesn't work? JS Bracket Notation for Objects

The problem asks to " Retrieve the second tree from the variable myPlants using object dot and array bracket notation."

@zman07, from what you have said here is says use object dot notation but you are using object bracket instead

//object dot notation example
key.value
//array bracket notation example
 array[0]

you need to use both together

You are correctly using array bracket notation to reference the second element of myPlants. However, you are not using dot notation to reference the list property of the element.

Is there a reason why I can’t use bracket notation for the “list” property and have to use dot notation?

the reason is that the tests are written to accept only that version

The reason is because the instructions state using object dot and array bracket notation.

myPlants is an array, list is a property of an object, and list and “pine” is an element of list. There is only one way to use a dot and that is for referencing list.

Gotcha, thank you! If the test didn’t restrict us to dot notation, could we use both object dot and object bracket notation simultaneously?

yes, you can use both dot and bracket notation in the same expression