let Human = function (userName, userAge) {
this.userName = userName;
this.userAge = userAge;
};
Human.prototype.sampleProto = function () {
console.log(this.userName + " == " + this.userAge);
let yy = function() {
console.log("in yy");
}
};
let human = new Human("Alex",30);
human.sampleProto();
If I were to replace the "let yy" with "this.yy" and then call it using human.yy();
Without using "this", is there a way to access it without person.testProto.yy() working?
Appreciated