What is a callback function?

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

What is a callback function?

21条回答
  •  青春惊慌失措
    2020-11-21 23:46

    A callback is an idea of passing a function as a parameter to another function and have this one invoked once the process has completed.

    If you get the concept of callback through awesome answers above, I recommend you should learn the background of its idea.

    "What made them(Computer-Scientists) develop callback?" You might learn a problem, which is blocking.(especially blocking UI) And callback is not the only solution to it. There are a lot of other solutions(ex: Thread, Futures, Promises...).

提交回复
热议问题