diff --git a/seed/challenges/02-javascript-algorithms-and-data-structures/es6.json b/seed/challenges/02-javascript-algorithms-and-data-structures/es6.json index 61d942d7037274..57104c90c4ed38 100644 --- a/seed/challenges/02-javascript-algorithms-and-data-structures/es6.json +++ b/seed/challenges/02-javascript-algorithms-and-data-structures/es6.json @@ -379,17 +379,17 @@ "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. Destructuring assignment is special syntax for neatly assigning values taken directly from an object to variables.", "Consider the following ES5 code:", - "
const voxel = {x: 3.6, y: 7.4, z: 6.54 };", + "
const x = voxel.x; // x = 3.6
const y = voxel.y; // y = 7.4
const z = voxel.z; // z = 6.54
var voxel = {x: 3.6, y: 7.4, z: 6.54 };", "Here's the same assignment statement with ES6 destructuring syntax:", "
var x = voxel.x; // x = 3.6
var y = voxel.y; // y = 7.4
var z = voxel.z; // z = 6.54
const { x, y, z } = voxel; // x = 3.6, y = 7.4, z = 6.54", "If instead you want to store the values of
voxel.x
into a
, voxel.y
into b
, and voxel.z
into c
, you have that freedom as well.",
- "const { x : a, y : b, z : c } = voxel // a = 3.6, y = 7.4, z = 6.54", + "
const { x : a, y : b, z : c } = voxel // a = 3.6, b = 7.4, c = 6.54", "You may read it as \"get the field
x
and copy the value into a
,\" and so on.",
"greeting
"
],
"challengeSeed": [
- "const greeting = 'itadakimasu'",
+ "const greeting = 'itadakimasu';",
"// change code below this line",
"const length = 0; // change this",
"// change code above this line",