First execute try, if there is an exception, execute catch, and execute finally anyway.
A function will definitely execute the part in finally.
Regarding the execution process of a function, when there is a return, the function will store the data in a certain location, and then tell the main function, I will not execute it anymore, you can execute it next, so the function will be launched.
But when finally appears in a function, finally will always be executed. Therefore, even if return has been executed in try or catch, the function will not exit at this time and will not tell the main function to execute. Instead, it will wait for finally to be executed. Then go back and tell the main function to execute it. At this time, if return appears in finally, the value of return will overwrite the value in try or catch, and then the main function will be told: I will not execute it, you go and execute it. . So the main function will get the return value in finally. That is to say, the return value of the sub-function is always the return value in finally (as long as there is a value in the called function)