This article is suitable for beginners of JavaScript. In JavaScript, What Is Callback "Callback function"? Use method B as a parameter to pass a method, after Method a is executed, execute another specified function (function B here). If you are interested, you can read this article. This article is suitable for beginners of JavaScript.
Gossip first. In China, there is such a phenomenon: No matter what word or concept, there will always be some people who interpret these things as if they do not understand what they think they are very powerful. In fact, I don't know how many 2. I personally advocate conciseness and clarity. What are the words and concepts? If you can use a short sentence or two to let everyone understand, this is the skill. Now, let's get started with the topic.
What is Callback "Callback function" in JavaScript? In my words, Method B is used as a parameter to pass a method, after Method a is executed, execute another specified function (function B here ). Let's look at a column:
The Code is as follows:
Callback function test