What is JavaScript?
What JavaScript is, why it's the language of the web, and where it runs today.
2 min read
JavaScript is a high-level, dynamically typed programming language originally built to make web pages interactive. Brendan Eich wrote the first version in 10 days at Netscape in 1995, and despite the rushed origin and the confusingly Java-adjacent name (the two languages are unrelated), it's now the only language that runs natively in every web browser — and, via Node.js, on servers, command-line tools, and desktop apps too.
console.log("Hello, world!");That line runs unmodified in a browser's console, in a <script> tag, or via node on the command line. No compilation step, no separate build — you write it and it runs.
Interpreted and JIT-compiled
JavaScript engines like V8 (Chrome, Node.js) don't compile your code ahead of time the way C++ does. They parse and start executing almost immediately, then use a just-in-time (JIT) compiler to optimize the hot paths of your code while it runs. You get the fast feedback loop of an interpreted language with performance that, for most real-world code, gets close to compiled languages.
Dynamically typed
Like Python, JavaScript doesn't require type declarations:
let value = "hello";
value = 42;Both lines are valid — the type lives with the value, not the variable, and a variable can hold anything at any point. This makes JavaScript quick to write, but it's also why a whole later lesson is dedicated to the type coercion bugs this flexibility can cause, and why TypeScript (covered in its own course) exists to add static types back on top.
Where JavaScript runs
- The browser — every major browser ships a JavaScript engine, making it the only language that runs natively on the client without a plugin.
- Servers — Node.js runs the same V8 engine outside the browser, powering APIs, build tools, and CLIs.
- Mobile and desktop — frameworks like React Native and Electron use JavaScript to build native-feeling apps.
ECMAScript: the standard behind the language
"JavaScript" is the common name; the actual language specification is called ECMAScript, maintained by TC39 and updated yearly (ES2015, commonly called ES6, was the release that added let/const, arrow functions, classes, and promises — features this course leans on throughout). Every browser vendor implements the same spec, which is why the same JavaScript file runs identically across Chrome, Firefox, and Safari.
The rest of this course starts with running actual code, then builds up through variables, functions, the DOM, and asynchronous JavaScript — the core toolkit for writing real programs in the language.
Test what you just learned
4 quick questions. Get all of them right to unlock the next lesson.
You can take the quiz without an account — logging in just lets your result count toward your progress.