Last active
January 14, 2019 16:03
-
-
Save mpj/b56371c672122a098d52 to your computer and use it in GitHub Desktop.
Examples for video "Closures - Part 5 of Functional Programming in JavaScript" (http://youtu.be/CQqwU2Ixu-U)
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 me = 'Bruce Wayne' | |
function greetMe() { | |
console.log('Hello, ' + me + '!') | |
} | |
greetMe() // Hello, Bruce Wayne! |
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 sendRequest() { | |
var requestID = '123' | |
$.ajax({ | |
url: '/myUrl', | |
success: function(response) { | |
alert('Request ' + requestID + ' returned') | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment