at “32.52” in the video ,if we replace “this.age=age” with “this.myAge=age”, that is ,if we use any variable other than age and then we return the same variable(myAge in this case) from isAdult function ,then ,p.isAdult() is showing error ,and error is “myAge is not defined”. What i think is that ,since it is written this.myAge inside person function ,hence ,the variable will not be available inside the isAdult() method,thats why it is showning not defined. plaease tell ,is i am correct?
Behavior of this
Always send the code along with query. I cant solve without the code.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.