34,333
edits
Changes
→Where to Place Function Declarations
== Where to Place Function Declarations ==
There are two recommended locations to place function declarations. These are either within the ''<head>'' section of the HTML document from which they will be called, or within a .js include file that is included in the ''<head>''. The preferred location is in the .js file since this provides the mosty flexibility in terms of making the functions available in other pages.