✅ Correto | ❌ Incorreto |
---|---|
const user = {
firstName: 'Vitor',
}; |
const user = {
userFirstName: 'Vitor',
}; const user = {
first_name: 'Vitor',
}; const user = {
_firstName: 'Vitor',
get firstName() {
return this._firstName;
},
}; |
✅ Correto |
---|
const user = {
firstName: 'Vitor',
}; |
❌ Incorreto |
const user = {
userFirstName: 'Vitor',
}; const user = {
first_name: 'Vitor',
}; const user = {
_firstName: 'Vitor',
get firstName() {
return this._firstName;
},
}; |