From 994ee89a86b2050bec056ddd7e0d3cb9f6bb457e Mon Sep 17 00:00:00 2001 From: Christopher Szczechowicz Date: Sat, 16 Feb 2019 08:50:10 -0500 Subject: [PATCH] fix: add a ; to the end of the example code (#34379) --- ...uring-assignment-to-assign-variables-from-objects.english.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-objects.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-objects.english.md index 9da20cdb06..4cf978131d 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-objects.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-objects.english.md @@ -13,7 +13,7 @@ Consider the following ES5 code: Here's the same assignment statement with ES6 destructuring syntax:
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, b = 7.4, c = 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.