-5

why would an external javascript script file be used as an alternative to an embedded script file? what are the benefits and negatives

kkrambo
  • 6,253
  • 1
  • 16
  • 30

1 Answers1

0

Embedded script files can only be used from the webpage in which they are embedded. External script files can be used from any webpage. This is useful as you do not need need to type the code again into every page. It saves time and file size. You can also edit a function by just editing the script file, and you do not have to edit the script on every webpage.

Wais Kamal
  • 5,442
  • 2
  • 14
  • 28