Skip to content

Instantly share code, notes, and snippets.

@jakes2255
Created September 13, 2019 08:10
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 jakes2255/9bfede573ccbf844a24feb9f52aa28ee to your computer and use it in GitHub Desktop.
Save jakes2255/9bfede573ccbf844a24feb9f52aa28ee to your computer and use it in GitHub Desktop.
function first(temp,callBack){
setTimeout(function(){
console.log(temp);
callBack();
},500);
//callBack();
}
function second(){
console.log(2);
}
first(1,second);
//outputs 1 and 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment