What language is JavaScript written in?

All the answers so far are correct, but since it hasn't been mentioned yet, JavaScript can be written in JavaScript.


Javascript is just a standard, more formally known as ECMAScript. It can be implemented in any language, just like any standard.

Chrome's Javascript engine, V8, is written in C++.

From the project page:

V8 is written in C++ and is used in Google Chrome, the open source browser from Google.

V8 implements ECMAScript as specified in ECMA-262, 5th edition, and runs on Windows (XP or newer), Mac OS X (10.5 or newer), and Linux systems that use IA-32, x64, or ARM processors.

Firefox's Javascript engine, SpiderMonkey (and now TraceMonkey) is also written in C++. And as maerics below said, Rhino is written in Java.


Most Javascript interpreters are written in C/C++ (V8, Nitro, etc…), however a compliant interpreter can be written in any language (Rhino→Java, Interpreter→Javascript, etc…).

Tags:

Javascript