Last active
April 7, 2020 11:58
-
-
Save radzserg/43dfb7d2b4cec93e4785ea94d214d344 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Cook { | |
| public makeDinner() { | |
| this.cookRoastedDuck(); | |
| this.cookCeasarSalad(); | |
| this.serveDrinks(); | |
| } | |
| private cookRoastedDuck() { | |
| console.log("Prepare the duck"); | |
| console.log("Add spices"); | |
| console.log("Roast the duck for 3 hours"); | |
| } | |
| private cookCeasarSalad() { | |
| console.log("mix salmon, avocado rest of ingredients"); | |
| } | |
| private serveDrinks() { | |
| console.log("Pepsi for kids"); | |
| console.log("Jack Daniels for grandfather") | |
| } | |
| } | |
| const mom = new Cook(); | |
| mom.makeDinner(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment