Introduction
JavaScript was initially the programming language that was run on web browsers.
When Node.js was born, JavaScript became available for programming outside of web browsers (e.g. you can now make a web server with Node.js).
With the dramatic success of Node.js, JavaScript is now "the most-used programming language among software developers" (Flanagan).
eval
and mocks the console
object.Properties of JavaScript
JavaScript is these kinds of programming language (Flanagan):
- high-level — meaning it is closer to a human language than a machine language (designed to be human-readable), as well asabstracting the details of the computer architecture on which it is run
- dynamic — things otherwise done at compile-time can be done at run-time (e.g. changing the type of a variable, extending objects, adding new codes)
- dynamically-typed — types of variables are assigned during run-time
- interpreted — the codes are not compiled; they are all parsed, interpreted, and executed during runtime
- has prototype-based inheritance — each object in JavaScript has a private property called
prototype
which references another object (its "parent", which also has its ownprototype
) ornull
(if it has no parent)
Despite their names' similarity, JavaScript has nothing to do with Java. (Some of their syntaxes may be similar, though.)
Standardization of JavaScript
The standardized version of JavaScript was called the "ECMAScript" (or "ES" for short), although everybody just called it JavaScript. This was submitted by Netscape for standardization by ECMA (European Computer Manufacturer’s Association).
ES5
For most of 2010s, ES5 (version 5 of the ECMAScript) has been supported by all web browsers. It introduces the "strict mode" which is meant to correct the language's design "mistakes" in pre-ES5 versions.
From ES6 onwards
Since ES6 (released in 2015), the ECMAScript specification is released on yearly basis as ES2016, ES2017, and so on.
ESNext
When somebody refers to "ESNext", they are usually talking about the upcoming version of ECMAScipt.
References
- JavaScript: The Definitive Guide, 7th Edition (David Flanagan) — Chapter 1. Introduction to JavaScript
- High-Level Language (HLL) » What Does High-Level Language (HLL) Mean? (Techopedia) — https://www.techopedia.com/definition/3925/high-level-language-hll
- Dynamic programming language (MDN) — https://developer.mozilla.org/en-US/docs/Glossary/Dynamic_programming_language
- Dynamic programming language (Wikipedia) — https://en.wikipedia.org/wiki/Dynamic_programming_language
- Dynamic typing (MDN) — https://developer.mozilla.org/en-US/docs/Glossary/Dynamic_typing
- Compiled versus interpreted languages (IBM) — https://www.ibm.com/docs/en/zos-basic-skills?topic=zos-compiled-versus-interpreted-languages
- Inheritance and the prototype chain (MDN) — https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain
- What is ESNext? (Stack Overflow) — https://stackoverflow.com/questions/56521178/what-is-esnext