Created
March 24, 2018 03:37
-
-
Save zonayedpca/986a03604ecb7e7f5eb4aa57dc3d37a0 to your computer and use it in GitHub Desktop.
First Class Functions
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 callMyName(name, callback) { | |
var myAge = 20; | |
callback(myAge); | |
console.log('Is it interesting? Yes it is Mr.' + name); | |
} | |
function hello(age) { | |
console.log('I am passed through argument and my age is: ' + age); | |
} | |
callMyName('Zonayed Ahmed', hello); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment