const menu = {
_courses : {
_appatizers: [],
_mains: [],
_deserts: []
},
get courses() {
return {
appatizers: this._courses._appatizers;
mains: this._courses._mains;
deserts: this._courses._deserts;
};
}
I am more concerned by how this return is used as an object; please explain as much you can to clarify the concept, thank you. forget about the code.