Last active
December 29, 2017 13:53
-
-
Save rayinla/835b389fd0b19de9c70f22db2f4e897a to your computer and use it in GitHub Desktop.
This file contains 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 init(args){ | |
var firstName = args.firstName; | |
var lastName = args.lastName; | |
function gerunding(action){ | |
return firstName + " " + lastName + " " + "is" + " " + action; | |
} | |
return gerunding; | |
} | |
var data = {firstName: "George", lastName: "Rooney" }; | |
var zombieOne = init(data); //when we initialize the outer function, it returns undefined. The outer function is dead, but... | |
/* | |
20 lines of code later... | |
*/ | |
zombieOne("walking"); // George Rooney is walking |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment