DEV Community

Cover image for What is JavaScript used for?
Amer Sikira
Amer Sikira

Posted on • Originally published at

What is JavaScript used for?

This post was originally published on

If you are a beginner in web development, where ever you go you hear about JavaScript. Today we are going to break it down and explain what is JavaScript and what is JavaScript used for.

JavaScript is the most popular language for 9 consecutive years, according to StackOverflow. It is one of the three core technologies of the web and much more than that.

1. JavaScript for Front-end

JS is the way of making websites “alive”. We use HTML for the skeleton, CSS for looks, but JS for everything else. Before JScame on the scene there were only static pages, basically What You See Is What You Get principle. Nothing fancy, nothing special.

But after JS came to the scene things started to change, interactivity was added, animations, reactions based on user actions. Later JS evolved in something that can be used for more than just animations.

A big influence on modern JavaScript, for the front-end, was jQuery. jQuery had some really cool features that made developers’ life easier, like selecting elements, AJAX, DOM manipulation was much easier, and many others.

Today JS is capable of doing much more than pure DOM manipulation. We can create SPA (Single Page Applications), PWA (Progressive Web Apps), we can use web sockets, and a lot of other things that are being added in form of an API like Navigator, Bluetooth, Beacon, Battery API, and others.

2. JavaScript for Back-end

Todays’ JavaScript has the ability to work on servers, like any other programming language: PHP, Python, Ruby, etc. Nodejs is a JavaScript framework that is used on the server-side to run processes, parses pages, and everything else that any other back-end programming language is normally doing.

Before Nodejs a lot of developers used PHP for creating their websites. Even today most of the websites are still running on PHP, but the trend is changing as per the StackOverflow survey. Maybe the key difference between PHP and Nodejs is that Nodejs is asynchronous, which means that Nodejs can be much faster than PHP. Also working with Nodejs is much easier because it does not require learning a new programming language or new syntax.

3. Mobile Development

Before Javascript’s frameworks like React Native and Ionic, developers used Java or Kotlin for Android development and Swift or Objective C for iOS development. For simple day-to-day applications, the native, way of creating applications can be much more expensive than hybrid applications.

With React Native and Ionic almost anyone who knows JS can create applications.

4. Desktop Development

Not so long ago developing apps for desktops with JS was impossible. Now, there are several frameworks that make that possible, one of which is electronjs. ElectronJS is an open-source framework developed and maintained by GitHub. Electron is using Chromium and Nodejs to create cross-platform applications, as a result, we can install those applications on Windows, Macs, and Linux. We are building applications in Electron using JavaScript, HTML, and CSS.

5. Game Development

JavaScript has become so powerful that we can use it to build games. There are a lot of libraries on the market like melonJS and impactJS.

6. Artificial Intelligence (AI)

AI’s popularity is rising every day. And the number of programmers deciding to try out AI is bigger every day. Earlier we had programming languages that were pretty good for that, like Python. Today there is the JSframework TensorFlow.

Developers can use TensorFlow to develop machine learning model that predicts data, categorize data, sort images, and many more.

7. Virtual Reality

With devices like Oculus Rift, which are now more accessible, virtual reality is becoming a thing again. We can use JS to develop new stuff for such devices. ThreeJS, aframe, React VR, and others are JSframeworks for creating and developing Virtual Reality.


Over time JavaScript became a really powerful, respected programming language. With JS we can create for different platforms like web, mobile, desktop.

If you have any questions or anything you can find me on my Twitter, or you can read some of my other articles like JavaScript replaceWith – how to use it

Top comments (0)