Last active
May 23, 2016 20:32
-
-
Save wolfieorama/d9fcaa6dca586403c3d457a36f144792 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
function buildAirlineTicketMaker(tclass){ | |
return function(name){ | |
alert("Here is your flight ticket via the " + tclass + ".\n" + | |
"Welcome to Luxury, " + name + "!"); | |
} | |
} | |
var getFirstClassTicket = buildAirlineTicketMaker("First class"); | |
var getBusinessClassTicket = buildAirlineTicketMaker("Business class"); | |
var getEconomyClassTicket = buildAirlineTicketMaker("Economy class"); | |
alert(getFirstClassTicket("Usain")); | |
alert(getBusinesClassTicket("Gatlin")); | |
alert(getEconomyClassTicket("Tyson")); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment