Answers for "generator in classs js"

0

generator in classs js

class Reply{
    *getReply (msg){
        //...
        return reply; 
    }
     *otherFun(){
        this.getReply();  //`this` seem to have no access to `getReply`
    }
}
var Reply = new Reply();
Reply.getReply();   //out of class,how can I get access to `getReply`?
Posted by: Guest on February-01-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language