Update description of beta challenge

This commit is contained in:
gogolab
2017-02-23 22:20:52 +01:00
parent 81fcc79800
commit 2373a771b0

View File

@ -379,17 +379,17 @@
"We earlier saw how spread operator can effectively spread, or unpack, the contents of the array.", "We earlier saw how spread operator can effectively spread, or unpack, the contents of the array.",
"We can do something similar with objects as well. <dfn>Destructuring assignment</dfn> is special syntax for neatly assigning values taken directly from an object to variables.", "We can do something similar with objects as well. <dfn>Destructuring assignment</dfn> is special syntax for neatly assigning values taken directly from an object to variables.",
"Consider the following ES5 code:", "Consider the following ES5 code:",
"<blockquote>const voxel = {x: 3.6, y: 7.4, z: 6.54 };<br>const x = voxel.x; // x = 3.6<br>const y = voxel.y; // y = 7.4<br>const z = voxel.z; // z = 6.54</blockquote>", "<blockquote>var voxel = {x: 3.6, y: 7.4, z: 6.54 };<br>var x = voxel.x; // x = 3.6<br>var y = voxel.y; // y = 7.4<br>var z = voxel.z; // z = 6.54</blockquote>",
"Here's the same assignment statement with ES6 destructuring syntax:", "Here's the same assignment statement with ES6 destructuring syntax:",
"<blockquote>const { x, y, z } = voxel; // x = 3.6, y = 7.4, z = 6.54</blockquote>", "<blockquote>const { x, y, z } = voxel; // x = 3.6, y = 7.4, z = 6.54</blockquote>",
"If instead you want to store the values of <code>voxel.x</code> into <code>a</code>, <code>voxel.y</code> into <code>b</code>, and <code>voxel.z</code> into <code>c</code>, you have that freedom as well.", "If instead you want to store the values of <code>voxel.x</code> into <code>a</code>, <code>voxel.y</code> into <code>b</code>, and <code>voxel.z</code> into <code>c</code>, you have that freedom as well.",
"<blockquote>const { x : a, y : b, z : c } = voxel // a = 3.6, y = 7.4, z = 6.54</blockquote>", "<blockquote>const { x : a, y : b, z : c } = voxel // a = 3.6, b = 7.4, c = 6.54</blockquote>",
"You may read it as \"get the field <code>x</code> and copy the value into <code>a</code>,\" and so on.", "You may read it as \"get the field <code>x</code> and copy the value into <code>a</code>,\" and so on.",
"<hr>", "<hr>",
"Use destructuring to obtain the length of the string <code>greeting</code>" "Use destructuring to obtain the length of the string <code>greeting</code>"
], ],
"challengeSeed": [ "challengeSeed": [
"const greeting = 'itadakimasu'", "const greeting = 'itadakimasu';",
"// change code below this line", "// change code below this line",
"const length = 0; // change this", "const length = 0; // change this",
"// change code above this line", "// change code above this line",