📜  js 类中的生成器 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:06.888000             🧑  作者: Mango

代码示例1
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`?