Help!Use Destructuring Assignment to Assign Variables from Objects

Tell us what’s happening:

Your code so far

function getLength(str) {
  "use strict";

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

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



Error: // running test
destructuring with reassignment was used
// tests completed

How is it fix?

Link to the challenge:

It’s OK. One line :roll_eyes:

Can you please upload the solution to this… I’m still struggling to get it. Thanks :slight_smile: