Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
JS Class Objects
So I may be over thinking this but is there an easy way to store or access all the āNewā Class Objects created. Iād like to store it in another object or something of the sort. Iām just looking for an easy way to iterate through Class Objects and the data within those objects if anyone can help with that. Iāve tried creating another object to try the push() Method but I get an undefined error on those class objects Iāve created. Thanks in advance.
1 Resposta
0
Thanks for the help. I actually ended up using another object like this
var myObject = {
Obj1: new Classā¦..
}
Im sure an array will work in pretty much the same way. I just like using dot notation better in my particular case. I have alot of different named properties and to me its just a bit easier naming it than saying [0].