Skip to content

Instantly share code, notes, and snippets.

@zonayedpca
Created March 24, 2018 03:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zonayedpca/986a03604ecb7e7f5eb4aa57dc3d37a0 to your computer and use it in GitHub Desktop.
Save zonayedpca/986a03604ecb7e7f5eb4aa57dc3d37a0 to your computer and use it in GitHub Desktop.
First Class Functions
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