I am new to javascript. I want a class method to return an array of objects instantiated by the same class. How to do that?
Currently,Basically the following is the general structure my code in question.
class myClass{
constructor(name,password,emailid,id) {
this.name = name;
this.password = password;
this.emailid = emailid;
this.id = id;
}
asyncMethod = async()=> {
//method returns array of objects of same class
}
}