const robotFactory = (model, mobile) => { return { model: model, mobile: mobile, beep(){ console.log('Beep Boop'); } } }; // parameters and entered in an order, check robotFactory const. const tinCan = robotFactory('P-500', true); tinCan.beep(); console.log(tinCan);