What is JavaScript

December 2, 2016
What is JavaScript

Every website on the World Wide Web does, in one way or another, rely on JavaScript. But what is a script in the coding world and what does it mean to a web developer?

A script is basically a program that boosts interaction within a website be it launching pop-up menus or responding to every action a web visitor makes like checking out items on an online store. Initially, there were two kinds of scripts available, Java and VB, but most modern websites now run the popular JavaScript.

Ways to use JavaScript

There are only two distinct ways in which this script can be used; either as an external or internal script. An external script means the web developer stores the script language in a separate file then the HTML pages will access this file whenever required. On the other hand, an internal script means the web developer prefers to store the script files within the HTML document itself.

When to use internal and external JavaScript

External JavaScript is ideal where a created functionality is going to be accessed by multiple HTML documents at any given time. The web developer will thus keep the script in a separate file that will be used within the HTML documents. In code, this is normally introduced as extension .js within a <script> tag.


Then we have the internal JavaScript where the web developer decides to include the script as they develop the HTML documents in code. Normally the script is introduced as a header with <script> tag but there is no limit to the number of locations the script can be introduced within in a document. The code below explains it;


When not to use JavaScript

As explained before, JavaScript runs on almost every browser or website. However, there are still those sites or browsers that run on different scripts thus don’t recognize Java. This will register as an error, when the web user tries to open a page or use the search engine, to the end user in the form of an incomprehensible code.

To prevent this from happening, the web developer thus introduces HTML comments around the script to hide it from older browsers or HTML pages.


That is JavaScript in a nutshell, a programming language that helps web developers introduces interactivity in websites. JavaScript can be internal or external and how these two options are used solely depends on the web developer.

If you need a top notch collection of WordPress themes and plugins, take a look at our Best Collections page.

For more tutorils on WordPress, SEO, Making money online, Google toools etc, just have a look at out at our latest articles

Article by reader87 Author
Published on: December 2, 2016
Last updated on:

Leave a Reply