Why use callback in JavaScript, what are its advantages?

后端 未结 10 1730
甜味超标
甜味超标 2020-12-04 18:02

Could someone explain, why do we use callback in JavaScript? I found examples, but they could be implemented by using the normal functions. What is the advantage of using it

10条回答
  •  一整个雨季
    2020-12-04 18:22

    A callback function is executed after the current effect is finished. A more detailed example available here.

提交回复
热议问题