01 / 06
Near-identical lines stack up
To take a value out of an object you have written user.name. If you use it several times, you put it in a variable first.
But the more entries there are, the more near-identical lines pile up on top of each other. It is hard for the reader too: "so which ones actually get used?"
const user = { name: "Yui", age: 20,};const name = user.name;const age = user.age;console.log(name);console.log(age);Result
Yui 20