I understood that there are two types of property in object, data property and access property.
And we can access to "data property" without "access property" like this:
const person = {
name: 'Pecan'
};
console.log(person.name) // getting name data property
person.name = 'Pie' // setting name data property
And I guess, when data property has created, access property has created internally with the "name" like this:
const person = {
name: 'Pecan',
get name() {
return this.name;
},
set name(name) {
this.name = name;
}
}
Am I right?