JavaScript is used to write almost the entire frontend – everything we see on the Internet. And relatively recently it has settled in the backend, on smartphones, and even in the firmware of smart teapots.

JavaScript is a language for controlling elements on a site. It can color buttons, run animations, load effects, all without reloading the page. For example, if you click the “Like” button, a red heart flashes. Or you hovered over three dots, and a menu popped up. In both cases, the page triggered a script. And JavaScript is just the main thing on the Internet – hence its name.

JavaScript appeared in the distant nineties, when the Internet was very young, and consisted mainly of text and hyperlinks. At that time, the company Netscape wanted a new language for the web in addition to HTML and CSS.

There were two reasons:

The noble one, so that people in the browser could not only read text, but also run different menus, boxes, flashing buttons, and so on.
Commercial: to rub Microsoft’s nose in it. At the time, there was a “browser war” going on between Netscape Navigator and Internet Explorer, and Netscape decided to get developers to work in their browser, using a new language.

And Netscape also made an agreement with Sun Microsystems to consider the language as the “little brother” of Java for browsers. This is how the name JavaScript came about – not because the languages are very similar, but because Java was in the hot seat at the time. In general, blame the marketers for everything 🙂