Skip to content

What Is JavaScript?

JavaScript is a programming language that mainly runs in web browsers. It is used for many tasks — making pages dynamic, handling user interaction, working with data — and, together with HTML, it makes web pages interactive.

The main characteristics of JavaScript are:

  1. Runs in the browser: JavaScript is interpreted by browsers, so it can run directly in the page and add interactivity to it.
  2. Dynamic and lightweight: Being a lightweight language that runs in the browser, it is ideal for dynamic pages: user interaction, form validation, animations and similar tasks.
  3. Object-oriented programming: JavaScript supports object-oriented programming (OOP). Its objects are prototype-based; the class syntax introduced in ES2015 is a more readable way of writing on top of that prototype model. Objects help organise code and make it reusable.
  4. Platform independence: Because it runs in the browser, JavaScript works the same on different operating systems.
  5. Works with HTML and CSS: JavaScript manipulates the DOM (Document Object Model) to change the content and style of a page while it is open.

JavaScript is one of the cornerstones of web development, and today it is not limited to the browser: with technologies such as Node.js it is also a popular language on the server.

Have a question about this article? Write to me