calling computed function inside methods 1

calling computed function inside methods

// correct    
console.log(this.myProperty);

// wrong    
console.log(this.myProperty());

Here is what the above code is Doing:
1. The first console.log() statement is correct because it is accessing the value of the myProperty property.
2. The second console.log() statement is incorrect because it is trying to call the myProperty property as a function.

Similar Posts