heroPower.getThorPower = function () { console.log(`thor power is ${this.thor}`); return `thor power is ${this.thor}`; }
You can do it without using proto. This technique is used for Abstraction in OOP.
Abstraction