Skip to content

Instantly share code, notes, and snippets.

@ohoroyoi
Last active July 13, 2019 15:34
Show Gist options
  • Save ohoroyoi/ddc912a92ffa1acd201a7600c7f91af8 to your computer and use it in GitHub Desktop.
Save ohoroyoi/ddc912a92ffa1acd201a7600c7f91af8 to your computer and use it in GitHub Desktop.
what_is_call_back.js
// callback : 인자로 함수를 받는 형태
function add(a, b){
return a + b;
}
function addFour(x, f){ // 인자로 함수를 받는 형태
return f(x, 4);
}
const value = addFour(1, add);
console.log(value);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment