## glossary

What is JavaScript?

JavaScript is an interpreted, dynamic, high-level programming language, created in 1995 by Brendan Eich in just ten days. It is the only language browsers execute natively — which made it mandatory for anything interactive on the web.

Its reach, however, left the browser a long time ago. With Node.js it started running on servers; with React Native, in mobile apps; with Electron, in desktop programs like VS Code and Discord.

The traits that define the language

  • Dynamic, weak typing — variables declare no type and conversions happen implicitly, which brings flexibility and also produces surprises.
  • Multi-paradigm — it supports imperative, object-oriented (via prototypes) and functional styles.
  • First-class functions — functions are values: they can be passed as arguments, returned and stored.
  • Single-threaded with an event loop — it executes one thing at a time, but delegates slow operations and keeps responding.
  • Closures — a function keeps access to the scope where it was created, the foundation of many of the language’s patterns.

Asynchrony: the heart of JavaScript

Since the language is single-threaded, it cannot sit idle waiting for a network response. The solution is the event loop: slow operations are delegated to the environment and the result comes back later, via callback, Promise or async/await.

The same operation across the language’s three generations
// callback — nesting grows fast
buscarUsuario(42, (erro, usuario) => {
  buscarPedidos(usuario.id, (erro, pedidos) => {
    console.log(pedidos);
  });
});

// Promise — flat chaining
buscarUsuario(42)
  .then((usuario) => buscarPedidos(usuario.id))
  .then((pedidos) => console.log(pedidos));

// async/await — reads like synchronous code
const usuario = await buscarUsuario(42);
const pedidos = await buscarPedidos(usuario.id);
console.log(pedidos);

The classic pitfalls

Weak typing produces behaviors that confuse beginners: 0.1 + 0.2 is not exactly 0.3 (floating-point arithmetic), [] == false is true (implicit coercion) and typeof null returns "object" (a bug preserved since 1995 for compatibility). Comparing with === instead of == avoids most of these cases, and TypeScript eliminates another large share while you are still writing the code.

ECMAScript and the yearly evolution

JavaScript is the implementation of a standard called ECMAScript. Since ES6 (2015) — which brought let, const, arrow functions, classes, modules and Promises — the standard gets a revision every year. To practice what changes in each version, check out the 7 sites to practice JavaScript.

## faq

Frequently asked questions

Are JavaScript and Java the same thing?

They are unrelated. The name was a marketing decision in 1995, when Java was at its peak. They are languages with different syntax, execution models and purposes.

Do I need to learn JavaScript before a framework?

Yes. React, Vue and Angular are JavaScript with conventions layered on top. Without understanding closures, promises, destructuring and scope, you get stuck on errors that look like framework problems but are language problems — and debugging becomes much harder.

Is JavaScript good for backend?

It is a solid choice, especially for APIs and I/O-heavy applications, where the asynchronous model performs well. For CPU-intensive processing or heavy numerical computation, languages like Go, Rust or Python with native libraries tend to be a better fit.

## read next

Related articles