📜  如何制作回调函数javascript代码示例

📅  最后修改于: 2022-03-11 15:01:35.955000             🧑  作者: Mango

代码示例3
//Callback functions - are functions that are called AFTER something happened

  const foo = (number, callbackFunction) => {
    //first 
    console.log(number)
    
    //second - runs AFTER console.log() happened
    callbackFunction()
  }