refactor(challenges): Change dot operator to notation
This commit is contained in:
parent
dc048c21c8
commit
d8bcb0f731
@ -2625,7 +2625,7 @@
|
||||
],
|
||||
"tests": [
|
||||
"assert(typeof timesFive === 'function', 'message: <code>timesFive</code> should be a function');",
|
||||
"assert(code.match(/timesFive\\(\\s*\\d+\\s*\\)/g), 'message: function <code>timesFive</code> should be called with a number');",
|
||||
"assert(code.match(/timesFive\\(\\s*\\d+\\s*\\)/g), 'message: function <code>timesFive</code> should be called with a number');",
|
||||
"assert(timesFive(5) === 25, 'message: <code>timesFive(5)</code> should return <code>25</code>');",
|
||||
"assert(timesFive(2) === 10, 'message: <code>timesFive(2)</code> should return <code>10</code>');",
|
||||
"assert(timesFive(0) === 0, 'message: <code>timesFive(0)</code> should return <code>0</code>');"
|
||||
@ -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>."
|
||||
|
Loading…
x
Reference in New Issue
Block a user