Help please,Accessing Nested Arrays

Help please,Accessing Nested Arrays
0

#1

Tell us what’s happening:

Your code so far

// Setup
var myPlants = [
  { 
    type: "flowers",
    list: [
      "rose",
      "tulip",
      "dandelion"
    ]
  },
  {
    type: "trees",
    list: [
      "fir",
      "pine",
      "birch"
    ]
  }  
];

// Only change code below this line

  // Change this line
myPlants[1].list[1];```
**Your browser information:**

Your Browser User Agent is: ```Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.2991.0 Safari/537.36```.

**Link to the challenge:**
https://www.freecodecamp.org/challenges/accessing-nested-arrays

#2

Not sure what you need help with, but here’s a thread that you may find useful: Stuck in Accessing Nested Arrays?


#3

If you look at the test results, you will see:

secondTree should equal “pine”

You deleted the original part of:

var secondTree = "";

The challenge is expecting you to retrieve the second tree from the variable myPlants using object dot and array bracket notation and assign it to secondTree.