Skip to content

JavaScript

In one line

JavaScript is the programming language that runs in web browsers to make web pages interactive and dynamic.

In simple words

JavaScript is the language of the web. While HTML structures a page and CSS styles it, JavaScript makes it interactive — responding to clicks, updating content without reloading, validating forms, and communicating with servers.

JavaScript runs in every modern browser, so you do not need to install anything to start. It is a high-level, interpreted language with C-like syntax. Beyond the browser, JavaScript also runs on servers (Node.js), making it a full-stack language.

Modern JavaScript (often called ES6+ or modern JS) added let, const, arrow functions, classes, modules, promises, and async/await. These features make the language more expressive and easier to reason about than older versions.

Example

javascript
// Change page content when a button is clicked
document.getElementById("btn").addEventListener("click", () => {
  document.getElementById("result").textContent = "Clicked!";
});

JavaScript attaches a click handler to a button and updates the page text when it is clicked.

Related terms

Related Resources

Related Lessons

Related Projects

Learn the fundamentals

Deepen your understanding with structured lessons on this topic.

View lessons

Decode error messages

Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.

View errors

← Back to glossary