What is a callback function?

前端 未结 21 2436
耶瑟儿~
耶瑟儿~ 2020-11-21 23:01

What is a callback function?

21条回答
  •  醉酒成梦
    2020-11-21 23:33

    Call After would be a better name than the stupid name, callback. When or if condition gets met within a function, call another function, the Call After function, the one received as argument.

    Rather than hard-code an inner function within a function, one writes a function to accept an already-written Call After function as argument. The Call After might get called based on state changes detected by code in the function receiving the argument.

提交回复
热议问题