What will be printed to the console when executing myObject.getName()?
const myObject = {
name: 'Carlos',
getName: function() {
return this.name;
}
};
console.log(myObject.getName());
What will be printed to the console when executing myObject.getName()?
const myObject = {
name: 'Carlos',
getName: function() {
return this.name;
}
};
console.log(myObject.getName());