Created
January 9, 2016 16:17
-
-
Save jmarmolejos/7364166f70c01faeb0f9 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
| const createCar = (carMake) => { | |
| const make = carMake; | |
| return { | |
| getMake: () => { | |
| return make | |
| } | |
| } | |
| } | |
| let car = createCar("Honda"); | |
| console.log(car.getMake()); // Logs Honda |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment