What is JavaScript?

Today’s web world is hard to imagine without the JavaScript language. JavaScript is what brings to life the web pages we view every day in our web browser.

JavaScript was created in 1995 at Netscape by developer Brandon Eich as a scripting language in the Netscape Navigator 2 browser. The language was originally called LiveScript, but in the wake of the popularity of another Java language at that time, LiveScript was renamed to JavaScript. However, this point still sometimes leads to some confusion: some novice developers believe that Java and JavaScript are almost the same language. No, these are absolutely two different languages, and they are related only in name.

Initially, JavaScript had quite a few features. Its purpose was just to add some behavior to the web page. For example, to process button clicks on a web page, to perform some other actions related primarily to controls.

However, the development of the web environment, the advent of HTML5 and Node.js technology has opened much wider horizons for JavaScript. Now JavaScript continues to be used to create websites, only now it provides much more options.

It is also used as a server-side language. That is, if earlier JavaScript was used only on a web page, and on the server side we had to use technologies such as PHP, ASP.NET, Ruby, Java, now thanks to Node.js we can process all requests to the server also using JavaScript.

The mobile development industry has been booming recently. And again, JavaScript is not left out: the increase in the power of devices and the ubiquity of the HTML5 standard has led to the fact that we can also use JavaScript to create applications for smartphones, tablets and desktop computers. That is, JavaScript has already crossed the boundaries of the web browser, which were outlined for it when it was created.

And what used to seem like science fiction, but today it has become a reality – javascript can be used for the increasingly popular development direction for IoT (Internet of Things or the Internet of Things). That is, JavaScript can be used to program a variety of “smart” devices that interact with the Internet.

Thus, you can find the use of JavaScript almost everywhere. Today it is indeed one of the most popular programming languages, and its popularity will continue to grow.

From the beginning, there have been several web browsers (Netscape, Internet Explorer) that provide different implementations of the language. And in order to reduce various implementations to a common core and standardize the language, the ECMAScript standard was developed under the leadership of the ECMA organization. In principle, the terms JavaScript and ECMAScript themselves are largely interchangeable and refer to the same language.

To date, ECMA has developed several language standards that reflect its development. Recently, a new standard has been released almost every year. At the moment, the latest adopted standard is ECMAScript 2021, which was approved on June 22, 2021. However, the implementation of standards in browsers takes quite a long time. Some browsers implement new standards faster than others. In addition, there is a large layer of old versions of browsers that ordinary users continue to use and which, of course, may not support the innovations of the latest standards. And this must be taken into account when developing programs in JavaScript. In this guide, we will mainly consider those features of JavaScript that are supported by all the most common modern browsers.

JavaScript is an interpreted language. This means that the JavaScript code is executed using the interpreter. The interpreter receives the JavaScript instructions that are defined on the web page and executes (or interprets) them.

Development tools

For JavaScript development, we need a text editor to write the code and a web browser to test it. As a text editor, I recommend using a program such as Visual Studio Code . It’s free, has a lot of features, and can be installed on Windows, Linux, and MacOS. Although this could be any other text editor.

There are also various development environments that support JavaScript and make development in this language easier, such as Visual Studio, WebStorm, Netbeans, and so on. You can also use these development environments if you wish.

So, let’s start creating the first program.