From 7732273a72abc72cedfaef05e0a0684b99148e8b Mon Sep 17 00:00:00 2001 From: Abhisek Pattnaik Date: Sun, 27 Dec 2015 20:32:04 +0530 Subject: [PATCH] Accessing Objects Properties with Variables --- .../basic-javascript.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/seed/challenges/01-front-end-development-certification/basic-javascript.json b/seed/challenges/01-front-end-development-certification/basic-javascript.json index 0f3f480198..0868d86594 100644 --- a/seed/challenges/01-front-end-development-certification/basic-javascript.json +++ b/seed/challenges/01-front-end-development-certification/basic-javascript.json @@ -3677,7 +3677,7 @@ "id": "56533eb9ac21ba0edf2244c9", "title": "Accessing Objects Properties with Variables", "description": [ - "Another use of bracket notation on objects is to use a variable to access a property. This can be very useful for itterating through lists of object properties or for doing lookups.", + "Another use of bracket notation on objects is to use a variable to access a property. This can be very useful for iterating through lists of object properties or for doing lookup.", "Here is an example of using a variable to access a property:", "
var someProp = \"propName\";
var myObj = {
propName: \"Some Value\"
}
myObj[someProp]; // \"Some Value\"
", "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", @@ -3708,7 +3708,8 @@ "" ], "solutions": [ - "" + "var playerNumber = 16;", + "var player = testObj[playerNumber];" ], "type": "waypoint", "challengeType": "1",