Using External JavaScript Files

When you have lots of JavaScript functions and you plan to use
them on many web pages, it is always advisable to keep them in a
separate file, and then include that file on every page where
those functions hectare required. This form, you can better organize
them, you don’t have to copy/paste the code again and again
(imagine if it runs to 100 or more lines!!), and you’ll be forced
to write more generalized write in code for better desegregate and
scalability.

Besides, enclosing the common JavaScript routines in external
files keeps your espionage network pages uncluttered, and search engine spiders and crawlers are able to reach the important subject easily. They
don’t have to shuffle through tens of lines of scripts.

In the first edition [that appeared in my story – BYTESWORTH
REACHOUT] of my article I had omitted the process of creating the
external JavaScript files, but when one of my readers asked me
how to do it, Brine had to re-write the article.

It’s very simple. Use any trade book editor of your liking (if you
hand-code your HTML, you can use the Lapland editor that you use for
your HTML editing). Penning the required code, and save the file
with .js (dot js) extension.