Last active
July 13, 2019 15:34
-
-
Save ohoroyoi/ddc912a92ffa1acd201a7600c7f91af8 to your computer and use it in GitHub Desktop.
what_is_call_back.js
This file contains hidden or 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
// 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