JavaScript is a high-level programming language, mainly used for web pages and web applications.
Scripts written in the JS are handled by most of web browsers, which allows to advanced interaction of a webpage with the user. For example, loading extra page content without reloading, animation of page elements, validating of form data before being sended to the server.
Nowadays, it is popular to use JavaScript with third-party frameworks, such as jQuery, or more modern React or Angular.
JavaScript can also be successfully used on the server side, e.g. with node.js framework, the advantage of which (depending on the needs) is the handling of asynchronous operations.
More info: