Use Destructuring Assignment to Assign Variables from Objects2

Tell us what’s happening:
Why it’s not passing the third case???
“destructuring with reassignment was used”…

Your code so far

function getLength(str) {
  "use strict";

  // change code below this line
  const len = str.length;
  // change code above this line

  return len; // you must assign length to len in line



Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36.

Link to the challenge:

It works but you didn’t use deconstruction.

You need to use new ES6 syntax like this.

const { x : a, y : b, z : c } = voxel

Got it. Thanks for the help…