Tell us what’s happening:
Hi friends,
I’m stuck here I need help please.
Here is the challenge link: https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-objects
I completely don’t understand though, I got everything right (according to the researches I did).
I won’t be surprise if it’s just some bugs or things like that.
Thanks in advance!
Your code so far
function getLength(str) {
"use strict";
// change code below this line
var length = {x: str.length};
const {x: len} = length;
// change code above this line
return len; // you must assign length to len in line
}
console.log(getLength('FreeCodeCamp'));
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-objects