Programming language · 1995

JavaScript

High-level programming language.

Official site ›
JavaScript logo
CWritten in
1995First released
Brendan EichDeveloper
dynamicTyping
Built fromInfluenced JavaScript CSelfSchemeLispJavaSmalltalkTypeScriptCoffeeScriptActionScriptDartReasonMLSolidity
RuntimeInfluence
ReplacedJava applets and Adobe Flash for in-browser interactivity
Being replaced byMost new front-end code is written in TypeScript, which compiles back to JavaScript

What is JavaScript written in?

JavaScript is a language standard, so the language itself is not "written in" one language. Modern JavaScript engines are mostly written in C++: V8, SpiderMonkey, and JavaScriptCore all use C++ for performance-critical compiler and runtime code.

What JavaScript is used for

JavaScript runs in every web browser, so it is the language of interactive front-end development; with Node.js it also runs servers, build tools, and desktop apps. Frameworks like React, Vue, and Angular are built in it, and it powers everything from single-page apps to serverless functions.

Notable software: virtually every modern website's interactivity, plus desktop apps built on Electron such as VS Code, Slack, and Discord.

About JavaScript

JavaScript is a high-level programming language. It is a dynamically typed and garbage-collected language that compiles to bytecode that runs on a virtual machine. It supports imperative, object-oriented, and functional programming. Compiling to bytecode for a virtual machine is the same model the JVM and .NET use: the VM, not the CPU, interprets or JIT-compiles the bytecode.

JavaScript first appeared in 1995 and was designed by Brendan Eich. Today JavaScript is one of the most widely used programming languages in the world.

JavaScript in the language family tree

JavaScript drew on ideas from Smalltalk, Java, Scheme, Self, and Lisp and went on to influence TypeScript, CoffeeScript, Dart, ReasonML, Solidity, and ActionScript.

Sources: Wikipedia · Wikidata · Official site

Quick Facts

Short answer
Modern JavaScript engines are mostly C++
Specification
ECMAScript
Major engines
V8, SpiderMonkey, JavaScriptCore
Historical note
Original SpiderMonkey began in C

JavaScript language vs JavaScript engines

JavaScript source code runs inside an engine. The ECMAScript specification, maintained by TC39 and published by Ecma International, defines the language: its syntax, semantics, and standard library. Engines such as V8, SpiderMonkey, and JavaScriptCore implement that specification. A JavaScript program is not "written in" a particular language any more than a PDF document is "written in" Acrobat; the engine is the implementation.

That distinction matters when answering "what is JavaScript written in?" The answer that is actually useful is about engines, because the engines are what run on your machine. V8 powers Chrome and Node.js. SpiderMonkey powers Firefox. JavaScriptCore powers Safari. Every major engine writes its performance-critical compilation and runtime code in C++, which gives it the low-level control needed to JIT-compile JavaScript to native machine code at acceptable overhead.

TypeScript, Babel, and other transpilers are written in JavaScript or TypeScript. They are pre-processing tools, not engines. They transform source code before it reaches an engine, but they do not define how JavaScript executes.

How modern JavaScript engines compile code

Modern JavaScript engines do not interpret source code line by line. They use a multi-tier compilation pipeline that trades compilation cost against execution speed based on how often each function runs.

V8's pipeline illustrates the pattern. First, V8 parses JavaScript into an AST and compiles it to Ignition bytecode, a compact intermediate representation. Ignition executes bytecode immediately. While it runs, V8 tracks how many times each function is called and what types its arguments receive. Functions that exceed a hotness threshold are handed to TurboFan, V8's optimizing JIT compiler, which generates highly tuned machine code based on the observed types. V8 introduced Maglev in 2023 as a mid-tier between Ignition and TurboFan, reducing compilation latency for medium-hot functions.

Speculative optimization is key. TurboFan assumes that a variable that has always been an integer will continue to be one, and generates fast integer code. If that assumption breaks because a string arrives, the engine deoptimizes: it throws away the compiled code and falls back to Ignition, then potentially recompiles with the wider type profile. This cycle is invisible to developers but drives JavaScript performance on tight loops and server-side Node.js workloads.

Major JavaScript engines

EngineWritten inUsed byJIT tiers
V8C++Chrome, Node.js, Deno, ElectronIgnition, Maglev, TurboFan
SpiderMonkeyC++, Rust, JavaScriptFirefoxBaseline JIT, IonMonkey
JavaScriptCoreC++Safari and WebKitLLInt, Baseline JIT, DFG, FTL
HermesC++React NativeAOT bytecode, minimal JIT
QuickJSCEmbedded environmentsInterpreter only

JavaScript release history

Brendan Eich created JavaScript in ten days in May 1995 while at Netscape, under a brief to make Navigator's pages interactive without requiring a Java applet. It shipped as LiveScript, was renamed JavaScript for marketing reasons, and had little in common with Java beyond the name and some syntax surface. Microsoft's JScript reverse-engineered it for Internet Explorer shortly after.

Ecma International standardized the language as ECMAScript. ES1 was published in June 1997. ES3 (1999) added regular expressions and try/catch and became the de-facto baseline for the 2000s. ES5 (2009) added strict mode, JSON support, and Array methods. ES6, rechristened ES2015, was the biggest release in the language's history: classes, arrow functions, promises, modules, template literals, destructuring, and generators.

Since ES2016, TC39 has shipped a new ECMAScript edition every June. Major additions include async/await (ES2017), optional chaining and nullish coalescing (ES2020), top-level await (ES2022), and array grouping and set operations (ES2024). The V8 and SpiderMonkey teams typically ship new syntax within months of TC39 Stage 4 approval.

Frequently Asked Questions

What language is JavaScript written in?
JavaScript itself is a language standard. Modern JavaScript engines such as V8, SpiderMonkey, and JavaScriptCore are mostly written in C++, although the earliest SpiderMonkey implementation was written in C.
What languages influenced JavaScript?
JavaScript was influenced by Smalltalk, Java, Scheme among others. See the influence section above for the full list.
Which languages did JavaScript influence?
JavaScript influenced TypeScript, CoffeeScript, Dart among others.
When was JavaScript first released?
JavaScript was first released in 1995. It was designed by Brendan Eich.

Evidence Sources

Discover More

Embed this graph

Paste this iframe into any HTML page to show the JavaScript relationship graph.

<iframe src="https://www.languagelineage.org/embed?lang=javascript" width="100%" height="500" loading="lazy" style="border:0" title="JavaScript relationship graph"></iframe>

Please attribute the visualization to Language Lineage and link to the JavaScript source record.

Explore JavaScript in Graph →