Quotes help make search much faster. Example: "Practice Makes Perfect"

Thursday, May 11, 2017

FreeCodeCamp Accessing Nested Arrays Sample Solution


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

// Only change code below this line

var secondTree = myPlants[1].list[1];

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts