JavaScript — what is it?

JavaScript is one of the most in-demand programming languages today. It began gaining ground in the early 2000s and remains one of the most advanced languages around.
In this article we work out what the language is, where it is used, why it is worth learning and what its future looks like.
JavaScript was originally created to work with web pages and web applications, which is why it is so closely bound up with front-end development.
Its purpose was to make things run so that a user's actions were carried out by the browser quickly and in real time.
Every pop-up window, animation, button press and input field is programmed in JavaScript, and only once the data is entered does it go off to the server.
Everything we write to make a program run is called a script, or a program.
There are two ways of running a program:
compilation — translating source code into machine code, the code a computer understands;
interpretation — an interpreter takes the code and runs it as it is, feeding it through piece by piece.
Every modern browser, Chrome and Mozilla Firefox included, has a JavaScript interpreter built in, so browsers run this code in real time and very fast.
Anyone can find any site's JavaScript in real time, change it as they see fit and see what happens. That is one of the language's strengths.
JavaScript is a client-side language — a front-end language, in other words: the part that interacts with the user directly.
PHP, Perl, Ruby and Python are server-side languages, because their scripts live on a remote machine and run there.
With JavaScript you can build anything you like: live chats, bots, robots, mobile applications, mobile sites, games, 3D games.
Application programming interfaces (APIs) extend what you can do with JavaScript. An API is a ready-made set of code that lets a developer drop in a working block quickly and correctly.
Does JavaScript have a future?
The web industry is moving very fast, and JavaScript will stay at the peak of its popularity for a long while yet. It will keep changing, but it is not going to disappear.