I'm a beginner and following a long from a udemy course and I've come across this example where we use the THIS keyword to reference the properties within it's object. However, I don't understand why we can't just grab the property like we would normally do when we are outside of the object by doing: objectname.property. I tested it and it seems to work fine. I'm obviously missing something so if someone could let me know that would be hugely appreciated! The example is below. Instead of using this, why not just use mark.bmi for instance.
const mark = {
name: `mark`,
mass: 92,
height: 1.95,
bmiCalc: function() {
this.bmi = this.mass / (this.height * this.height);
return this.bmi;
}
}