JavaScript has evolved as a front-runner as the go-to language for building applications. Despite many of its weaknesses (found in the earlier versions of javascript), JavaScript has now matured (with the advent of ES6 / ES2015) into a language that is no longer limited to web browsers.
Following are some of the areas where JavaScript is used
Web Applications (Frontend) – JavaScript is the defacto standard for client-side web development. HTML adds structure to the web page, CSS adds style and JavaScript adds behavior to the web pages. These days there is heavy usage of JavaScript on the front-end to create the better user experience by implementing SPA’s (Single Page Application). To achieve these, modern JavaScript libraries and frameworks have come into picture like React JS, Angular & Vue to name a few.
Web Servers (Backend) – Until early 2009, JavaScript was considered to be a language that could be written and executed within the context of the web browser. This was because all browsers had JavaScript interpreters within them.When Google open sourced it’s Chrome’s JavaScript engine called the V8, this gave birth to Node JS, which is a JavaScript runtime environment. Simply put it is a bundle of a bunch of C++ libraries required for common I/O, file system, Network operation along with Google V8 engine. This made it possible to write JavaScript for highly scalable Backend Servers due to its non-blocking nature. Now there are many popular web application frameworks built on top of Node JS like Express, Sails JS, Koa etc.
Mobile Applications – HTML/JS/CSS can be used to develop mobile applications. React Native enables developers to write mobile applications with their existing knowledge of JavaScript + React, and the framework exports the application as a native application which can be installed via the Google Play store or Apple iStore.
Desktop Applications – These applications are coming back to trend. It gives someone the ability to develop applications (client-server) with their knowledge of JavaScript, React & Node. Building applications using frameworks like Electron JS, the developer can write once and make an installation copy for windows, mac or Linux users.