Jasyn Marais

What is JavaScript?

2 February 2023

JavaScript is a lightweight interpreted1 programming language that conforms to the ECMAScript standard. At once a very simple and very complicated language - it can take minutes to learn but years to master.

JavaScript is considered a 'loosely' typed language, in which types do exist, but they are not enforced. You do not have to declare a type when creating a variable or an array, for example.

It is the dominant client-side scripting language of the Web, with 98% of all websites using it for this purpose. Scripts are embedded in or included from HTML documents and interact with the DOM. All major web browsers have a built-in JavaScript engine that executes the code on the user's device.

Released in 1995, JavaScript was originally designed to be used purely on the front end as a way for web developers to add funtionality to their web pages.

JavaScript engines were originally used only in web browsers, but are now core components of some servers and a variety of applications. The most popular runtime system for this usage is Node.js.

Though JavaScript and ECMAScript are often used synonymously, JavaScript is much more than just what is defined in ECMA-262. A complete JavaScript implementation is made up of the following three distinct parts:

Footnotes

1. From a technical standpoint, most modern JavaScript interpreters actually use a technique called just-in-time compiling to improve performance; the JavaScript source code gets compiled into a faster, binary format while the script is being used, so that it can be run as quickly as possible. However, JavaScript is still considered an interpreted language, since the compilation is handled at run time, rather than ahead of time.