Details about js anonymous functions as function parameters and js anonymous function parameters
I sincerely lament that js is really annoying.
After learning it, I gradually understood what it is: the language is universal, not good, but good at and not good.
Inheritance, polymorphism, and even pointer, can be implemented by c, c ++, java, and javascript (the difference between Lei Feng and Lei Feng tower in java, and the name does not know how many people are involved) it can also be flexibly implemented.
I have forgotten it again today. Anonymous functions are used as function parameters.
The code is very short and dirty.
<! DOCTYPE html>
Why can an anonymous function be automatically executed as a function parameter?
Is the anonymous function Self-executed?
Error !!! Anonymous function! = Self-executed anonymous Functions
There is only one truth:An anonymous function is called and executed in the call (using an anonymous function as a parameter) function.
Function test (a, B) {a + = 1; // B is an object, and the function name is also an object, so B can refer to a function. // similar to the function name in c ++. // a is copied to B (result). // js is flexible. B ();}
The above js anonymous functions, as detailed descriptions of function parameters, are all the content that I have shared with you. I hope to give you a reference and support for the help house.