What did the js file do when it was loaded?

what does a js file load mainly do? is there anything to deal with at this time of variable and function declaration

Apr.05,2021

After the

JS file is loaded, the
first step, variables in the file that are root-level and not defined with any keywords are given priority as global variables.
step 2, all separately defined function xxx () declarations take effect
step 3, and the other parts execute

in the sequence according to the code logic written in js. During the loading process of

file, the content is not complete, and it does not involve the processing of variables and function declarations.

Menu