Created
May 21, 2014 08:23
-
-
Save JackTanRoo/8e0ad5a96dd97bf425db 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 x(arg1){ | |
function y(arg2){ | |
do stuff | |
} | |
}(z) // <------where does z get subbed in? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
so above is essentially like calling:
return x(z); right?
so if I wanted an anonymous function that I dont want to be called elsewhere (like a block in ruby):
i can do this:
function(){
do stuff
}(z)
which would be the same as:
function(arg1 = z){
do stuff
}
?