Created
March 20, 2014 17:48
-
-
Save buley/9669739 to your computer and use it in GitHub Desktop.
How I explained promises
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
var ryan = function() { | |
console.log('hey girl'); | |
}; | |
for ( var x = 0; x < 10; x += 1 ) { | |
(function(z) { var prev = ryan; | |
ryan = function() { | |
console.log('hey guy', z); | |
prev(); | |
} }(x)); | |
} | |
ryan(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment