JS
In short: JavaScript — the scripting language that runs in the browser and makes web pages interactive.
In more detail: Originally a pure browser language, today also usable server-side thanks to Node.js. Runs single-threaded with an event loop, which makes asynchronous operations (e.g. network requests) run in a non-blocking way. TypeScript builds directly on JavaScript as a typed extension.
In Depth
Single-threaded with an event loop
The single-threaded model with an event loop is JavaScript’s central execution principle: there’s only a single thread of execution, but long-running operations (a network request, a timer, file I/O in Node.js) are delegated to the environment (browser or Node.js runtime) in a non-blocking way — once they’re finished, the event loop queues their callback function back into the main thread.
console.log("1");
setTimeout(() => console.log("2"), 0);
console.log("3");
// Output: 1, 3, 2 - the timer callback only runs AFTER the rest of the synchronous code
async function loadData() {
const response = await fetch("/api/data");
const data = await response.json();
return data;
}From callbacks to async/await
Modern asynchronous programming usually runs via Promises (objects representing a future value) and the async/await syntax, which makes the previously common, deeply nested “callback hell” (several callback functions nested inside each other, which quickly made code hard to follow) considerably more readable — with async/await, asynchronous code reads almost like synchronous code, even though it still works non-blockingly underneath.
Historical quirks
JavaScript was developed in 1995 by Brendan Eich in just ten days for the Netscape browser (under the original name Mocha, then LiveScript, only renamed to “JavaScript” shortly before release for marketing reasons, to benefit from the then-popular language Java — the two languages are technically largely unrelated). This extremely short development time left behind some historically caused quirks that persist today (e.g. loose, sometimes surprising automatic type coercion: "5" + 3 gives "53", but "5" - 3 gives 2), which TypeScript specifically defuses through static type checking, without replacing the language itself.
Standardisation via ECMAScript
JavaScript is formally specified via the ECMAScript standard — different environments (browser, Node.js, Deno) each implement this standard, with sometimes slightly different feature sets. Since 2015 (ES6/ES2015), a new ECMAScript version with new language features appears every year, which has made JavaScript considerably more modern and powerful over the last ten years than in its first two decades.
See also: TypeScript, HTML, Node.js