Destructuring Objects in JS

keep getting error with JavaScript JS DSA beta Football Team Cards project, step 20, destructuring objects
error message given is Not very helpful!
const {headCoach: {coachName}} = myFavoriteFootballTeam;
console logging the object gives ‘Carlos Bilardo’

1 Like

Hello! @goobric

You’re almost there!

We can write it using object destructuring const { coachName_value } = football_team_object_name.coach_propertyName;

Resources: fCC

you did good, but in this case it wants only one level of destructuring. One could argue that the tests should accept both versions. You can bring it up on github, opening an issue

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.