homework javascript using objects