[beta] ES6: Use Destructuring Assignment with Objects - description errors
See original GitHub issueChallenge use-destructuring-assignment-with-objects has an issue.
User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:51.0) Gecko/20100101 Firefox/51.0
.
Please describe how to reproduce this issue, and include links to screenshots if possible.
In description it says:
“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
“const” is ES6, should be “var”?
Also: is below code correct? Are there “a”, “y”, “z” on purpose, maybe to show that you can use xyz and abc?
const { x : a, y : b, z : c } = voxel // a = 3.6, y = 7.4, z = 6.54
edit: I clicked “Run tests” to see some errors descriptions, but instead of errors I got confirmation of solved challenge (and all tests passed even though I didn’t change anything in code yet).
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Destructuring assignment - JavaScript - MDN Web Docs
The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, ...
Read more >ES6 Destructuring Assignment - Medium
Destructuring assignment is syntactic sugar for neat assignment of values taken directly from an object. Below are the different ways ES6 ...
Read more >Destructuring Assignment in JavaScript - GeeksforGeeks
Destructuring Assignment is a JavaScript expression that allows to unpack values from arrays, or properties from objects, into distinct ...
Read more >ES6 Use Destructuring Assignment to Assign Variables from ...
The example talks about using commas to get to a certain index in an array so you can assign a value in that...
Read more >ES6: Use Destructuring Assignment to Assign Variables from ...
I find the question confusing because it's not obvious that a string is an object that has a length property, whereas this is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Ethan-Arrowood thanks for offering to help.
@BerkeleyTrue what’s the status of ES6 transpilation?
@Greenheart
Do you need assistance in setting up a webpack config file? I can probably lend a hand here if thats the case.