One of the biggest differences between js and languages like java is that functions are also regarded as data and can be operated like an object in java. And since js does not perform type checking, arrays can store anything. So I wondered if functions could be stored in arrays.
Achieve the following functions:
The function stores itself in the array after being called (it can not be stored according to the parameters)
Then a large function can be used to operate the array, Call the functions in it.
Originally I wanted to use this method to perform the Undo function (that is, each function stores itself in it, and if it is Undo, the last function will be eliminated and the entire queue will be executed), but later I felt that this was too troublesome. However, the function of the function array is implemented: Paste JSP