Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const make_cheesecake = type => {
- let cheesecake = null;
- switch(type){
- case 'oreo':
- cheesecake = new OreoCheesecake();
- break;
- case 'coffee':
- cheesecake = new CoffeeCheesecake();
- break;
- case 'tiramisu':
- cheesecake = new TiramisuCheesecake();
- break;
- case 'smores':
- cheesecake = new SmoresCheesecake();
- break;
- case 'hazelnut':
- cheesecake = new HazelnutCheesecake();
- break;
- default:
- cheesecake = new OriginalCheesecake();
- break;
- }
- cheesecake.make_crust;
- cheesecake.add_layers;
- cheesecake.bake;
- cheesecake.refrigerate;
- cheesecake.add_toppings;
- cheesecake;
- }
Add Comment
Please, Sign In to add comment