This commit adds the pre-existing challenge guide topics in the forum to the forntmatter of their challenge markdown files.
		
			
				
	
	
	
		
			2.1 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			2.1 KiB
		
	
	
	
	
	
	
	
id, title, challengeType, videoUrl, forumTopicId
| id | title | challengeType | videoUrl | forumTopicId | 
|---|---|---|---|---|
| 56533eb9ac21ba0edf2244cd | Accessing Nested Arrays | 1 | https://scrimba.com/c/cLeGDtZ | 16160 | 
Description
var ourPets = [
  {
    animalType: "cat",
    names: [
      "Meowzer",
      "Fluffy",
      "Kit-Cat"
    ]
  },
  {
    animalType: "dog",
    names: [
      "Spot",
      "Bowser",
      "Frankie"
    ]
  }
];
ourPets[0].names[1]; // "Fluffy"
ourPets[1].names[0]; // "Spot"
Instructions
myPlants using object dot and array bracket notation.
Tests
tests:
  - text: <code>secondTree</code> should equal "pine"
    testString: assert(secondTree === "pine");
  - text: Use dot and bracket notation to access <code>myPlants</code>
    testString: assert(/=\s*myPlants\[1\].list\[1\]/.test(code));
Challenge Seed
// Setup
var myPlants = [
  {
    type: "flowers",
    list: [
      "rose",
      "tulip",
      "dandelion"
    ]
  },
  {
    type: "trees",
    list: [
      "fir",
      "pine",
      "birch"
    ]
  }
];
// Only change code below this line
var secondTree = ""; // Change this line
After Test
(function(x) {
  if(typeof x != 'undefined') {
    return "secondTree = " + x;
  }
  return "secondTree is undefined";
})(secondTree);
Solution
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];