Basically I want to destruct this object to get this result but in the console I see u is not defined
The object:
const game =
releases: {
"Oath In Felghana": ["USA", "Japan"],
};`
My code:
const {
releases: {
"Oath In Felghana": o = [u, j],
} = game;
console.log(`My Best Release Is ${o} It Released in ${u} & ${j}`);
What I want to see
My Best Release Is Oath In Felghana It Released in USA & Japan
what I get
Uncaught ReferenceError: u is not defined
So the problem is that it shows me that you is undefined even though I used array destructuring to destruct it
It's mentioned in the task that you need to use key and values, so I tried to put this between the object and my destructuring
game.releases["Oath In Felghana"] = Object.keys(game.releases["Oath In Felghana"]);
but still doesn't work.