Tell us what’s happening:
Hi guys. My console.log and bottom of screen show I reassigned but it won’t pass the last test. Am I doing something wrong?
Your code so far
console.log(getLength('FreeCodeCamp'));
function getLength(str) {
"use strict";
const length = {x:str.length};
let {x:len} = length;
console.log(len);
return len;
}
console.log(getLength('FreeCodeCamp'));
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-objects/