refactor(challenges): Change dot operator to notation

This commit is contained in:
Francis Clavette 2017-08-23 20:14:21 -04:00
parent dc048c21c8
commit d8bcb0f731

View File

@ -4198,11 +4198,11 @@
},
{
"id": "56533eb9ac21ba0edf2244c7",
"title": "Accessing Object Properties with the Dot Operator",
"title": "Accessing Object Properties with Dot Notation",
"description": [
"There are two ways to access the properties of an object: the dot operator (<code>.</code>) and bracket notation (<code>[]</code>), similar to an array.",
"The dot operator is what you use when you know the name of the property you're trying to access ahead of time.",
"Here is a sample of using the dot operator (<code>.</code>) to read an object's property:",
"There are two ways to access the properties of an object: dot notation (<code>.</code>) and bracket notation (<code>[]</code>), similar to an array.",
"Dot notation is what you use when you know the name of the property you're trying to access ahead of time.",
"Here is a sample of using dot notation (<code>.</code>) to read an object's property:",
"<blockquote>var myObj = {<br> prop1: \"val1\",<br> prop2: \"val2\"<br>};<br>var prop1val = myObj.prop1; // val1<br>var prop2val = myObj.prop2; // val2</blockquote>",
"<hr>",
"Read in the property values of <code>testObj</code> using dot notation. Set the variable <code>hatValue</code> equal to the object's property <code>hat</code> and set the variable <code>shirtValue</code> equal to the object's property <code>shirt</code>."