Object Destructuring in under 60 Seconds #javascript #coding #programming

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Also, in the "bad" way the variable hasn't the same name. username -> userName.
So you can destructure and rename like this :

const { username: userName } = user;

BullsEye