What value is obtained when executing myObject.calculateAge() in the following code?
const myObject = {
yearOfBirth: 1990,
calculateAge: function() {
return 2023 - this.yearOfBirth;
}
};
What value is obtained when executing myObject.calculateAge() in the following code?
const myObject = {
yearOfBirth: 1990,
calculateAge: function() {
return 2023 - this.yearOfBirth;
}
};