๐ Coding Study/React, JS
์ฝ๋ฐฑ ํจ์ (Callback function)
๋นต๋ชจ๋ฃจ
2023. 10. 9. 22:56
๋ค๋ฅธ ํจ์์ parameter๋ก์จ ์ ๋ฌ๋๋ ํจ์.
๋ค๋ฅธ ํจ์์ ์ํด ํธ์ถ๋๋ ํจ์.
const message = function() {
console.log("oh")
}
setTimeout (message, 3000)
์ด๋ ๊ฒ ํ๋ฉด 3์ด ๋ค์ message ํจ์๊ฐ ํธ์ถ๋จ.
LIST