I'm trying to get the name of an object and put it in an array after it's defined, I tried doing this code, but the name ended up being undefined
any help?
function command(category, help, callback) {
this.category = category;
this.help = help;
this.do = callback;
cmndlist[category].push(this.name);
};