From bce8e0a5e93dca57d7734de5b0d6abedd0517272 Mon Sep 17 00:00:00 2001 From: Seth Wilson Date: Fri, 16 Mar 2018 10:45:35 -0500 Subject: [PATCH] fix(challenges): Fix typo in code example (#16866) --- .../basic-javascript.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seed/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json b/seed/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json index 5a3f2b24c39..361abdb5f7d 100644 --- a/seed/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json +++ b/seed/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json @@ -4413,8 +4413,8 @@ "Here is an example of using a variable to access a property:", "
var dogs = {
Fido: \"Mutt\",\n Hunter: \"Doberman\",\n Snoopie: \"Beagle\"
};
var myDog = \"Hunter\";
var myBreed = dogs[myDog];
console.log(myBreed); // \"Doberman\"
", "Another way you can use this concept is when the property's name is collected dynamically during the program execution, as follows:", - "
var someObj = {
propName: \"John\"
};
function propPrefix(str) {
var s = \"prop\";
return s + str;
}
var someProp = propPrefix(\"Name\"); // someProp now holds the value 'propName'
console.log(obj[someProp]); // \"John\"
", - "Note that we do not use quotes around the variable name when using it to access the property because we are using the value of the variable, not the name.", + "
var someObj = {
propName: \"John\"
};
function propPrefix(str) {
var s = \"prop\";
return s + str;
}
var someProp = propPrefix(\"Name\"); // someProp now holds the value 'propName'
console.log(someObj[someProp]); // \"John\"
", + "Note that we do not use quotes around the variable name when using it to access the property because we are using the value of the variable, not the name.", "
", "Use the playerNumber variable to look up player 16 in testObj using bracket notation. Then assign that name to the player variable." ],