my question is similar to this. But I want to put async keyword to a prototype function, not to a constructor.
"this" is undefined in the prototype function saySomething. Why? How can I use async in class?
var Person = function() {
console.log("CALLED PERSON")
};
Person.prototype.saySomething = async () => {
console.log(this);//undefined
};
(async function(){
var ape = new Person();
await ape.saySomething();
}());