Skip to main content

JavaScript

Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/javascript

In short

JavaScript is the programming language that runs in web browsers to make pages interactive, and it also runs on servers through runtimes like Node.js.

What is JavaScript?

JavaScript is the programming language of the web. While HTML defines a page's structure and CSS defines its look, JavaScript makes the page interactive: it responds to clicks, validates forms, fetches new data, and updates content without reloading the page.

In the browser, JavaScript works with the DOM, the browser's object representation of the page. It is single-threaded, meaning it runs one piece of code at a time, but it handles slow tasks like network requests asynchronously with callbacks, promises, and async/await, so the page stays responsive while it waits.

JavaScript is no longer limited to browsers. Runtimes such as Node.js, Deno, and Bun run it on servers and developer machines, so one language can be used for the front end, the back end, and build tools. The language itself is standardized as ECMAScript, and a new edition is published every year.

Despite the similar name, JavaScript has nothing to do with Java; the name was a marketing decision in the 1990s. TypeScript is a separate language built on top of JavaScript that adds static types and compiles back to plain JavaScript.

Key takeaways

  • JavaScript adds interactivity and logic to web pages.
  • Every major browser runs it without plugins.
  • It handles slow operations asynchronously with promises and async/await.
  • Node.js, Deno, and Bun run JavaScript outside the browser.
  • The official language specification is called ECMAScript.

Example

Reacting to a button clickjavascript
// Find the button and the counter text in the page
const button = document.querySelector("#like");
const label = document.querySelector("#count");
let likes = 0;

// Run this function every time the button is clicked
button.addEventListener("click", () => {
  likes += 1;
  label.textContent = `${likes} likes`;
});

Readers ask

Are Java and JavaScript the same?

No. They are different languages with different designs and uses. The similar name came from a 1990s marketing decision, not from a technical relationship.

What is the difference between JavaScript and ECMAScript?

ECMAScript is the official specification that defines the language, and JavaScript is the name of the language that implements it. Names like ES2015 or ES2025 refer to yearly editions of that specification.

Can JavaScript be used for back-end development?

Yes. Runtimes like Node.js, Deno, and Bun let JavaScript run on servers, where it is commonly used to build APIs and web applications.

Often compared

See also

Sources

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings