Separating JavaScript Code File

 • Re-use the code  

No need of re-writing on each webpage  

Code only has to be tested once for errors   

File/JavaScript is cached by web browser  

...reduces network access time 

JavaScript code embedded in webpages can slow loading times

...webpage can slow while browser executes code  

Can separate code into different conceptual areas  

...provides modularity to code  

...separate html and JavaScript code so easier to read/maintain.


Comments