This article is suitable for entry-level JavaScript players to read, and experts can easily pass it.
Let’s talk some gossip first. In China, there is such a phenomenon: no matter what words or concepts, there will always be some people who explain these things in a magical way, seemingly making others feel that they are very powerful even if they don't understand. Actually, I don’t know how many there are. I personally prefer simplicity and clarity. No matter what words or concepts, if you can use a short sentence or two to make everyone understand, this is your skill. Okay, let’s stop chatting and get to the point.
What is Callback in JavaScript? In my words, method b is passed as a parameter to method a. When method a is executed, another specified function is executed (here is function b) ). Let’s look at an example: