What is JavaScript? A common misconception about JavaScript is that many people believe the program is related to Java. Which is not true. JavaScript is a programming language that adds interactivity and custom behavior to sites. It is a client-side scripting language, which means it runs on the user’s machine and not on the server. JavaScript is reliant on the browser’s capabilities and settings. Overall, JavaScript is known as a dynamic and loosely typed programming language.
What are its advantages? JavaScript is a dynamic programming language so it does not need to run through any form of complier, which is a program that converts instructions into a machine-code or lower level form so that they can be read and executed by a computer, that interprets our human-readable code into something the browser can understand. JavaScript is also loosely typed which means you do not have to tell JavaScript what a certain variable is.
When do you use it? Incorporate JavaScript into your website when you want to incorporate interactivity to your page. JavaScript is the only language available that lets your website communicate with the browser and watch for events. JavaScript allows you to create highly responsive interfaces that improve the user experience and provides dynamic functionality. JavaScript can be used to request content and information from the server and insert it into a document, show and hide content based on a user clicking on a link, or test for browsers’ individual features and capabilities. JavaScript can also fill in gaps where a browser’s built in functionality falls short. These types of scripts are called polyfills.
How do you add the script to your html document? You can add JavaScript to your html document by adding an embedded script, external scripts, or script placement.
JavaScript Resources:




