JSFiddle - React, Tailwind, and code Playground
by ysuper
HTML
<p>什麼是Callback函式 (Callback function)</p>
<p>1、讓函式成為另一個函式的參數</p>
<p>2、讓函式控制參數函式的執行時機</p>
JavaScript
function a(f){
console.log("f a")
f()
}
function b(){
console.log("f b")
}
a(b)