只要是看到一个函数作为参数使用了,那就是回调函数。

function iChi(fn){
console.log("1");
fn();
}
function ni(){
console.log("2");
}
iChi(ni);

相关文章: