Does the ORDER of javascript files matter, when they are all combined into one file?

后端 未结 5 1388
北恋
北恋 2020-12-14 07:23

In todays modern age, where lots of (popular) javascripts files are loaded externally and locally, does the order in which the javascripts files are called

5条回答
  •  半阙折子戏
    2020-12-14 08:02

    If I'm understanding your question I think you're asking if it matters where in a file a function/method is defined, and the answer is no, you can define them anywhere in a single source file. The JavaScript parser will read in all symbols before trying to run the code.

提交回复
热议问题