One, foreword
JavaScript is a lightweight scripting language that allows you to write scripts that control other applications, such as browsers.
JavaScript is also an embedded language that can be embedded into other application environments, such as browsers or servers, to invoke apis provided by the host environment.
Second, the birth of JavaScript
Brendan Eich of Netscape designed (not implemented) the first version of JavaScript in ten days in 1995.
Its syntax comes from multiple sources:
- Basic syntax: C language and Java language.
- Data structure: Borrowed from the Java language, including the separation of values into primitive values and objects.
- Use of functions: Draw on Scheme and Awk to treat functions as first class citizens and introduce closures.
- Prototype inheritance model: Borrow from Self (a variant of Smalltalk).
- Regular expressions: Borrow from Perl.
- String and array handling: Borrow from Python.
JavaScript was originally called Mocha, later changed to LiveScript, and then to JavaScript. But JavaScript has little to do with Java.
The relationship between JavaScript and ECMAScript
ECMAScript is the standard for the browser scripting language, and JavaScript is the implementation of the browser scripting language.
Fourth, the composition of JavaScript language
- ECMAScript, which describes the syntax and basic objects of the language
- Document Object Model (DOM), which describes methods and interfaces for handling web page content
- The Browser Object Model (BOM), which describes the methods and interfaces for interacting with the browser
5. JavaScript version
- In 1997, ECMAScript 1.0 was released
- In 1998, ECMAScript 2.0 was released
- In 1999, ECMAScript 3.0 was released as the standard for JavaScript and is the most widely used version
- In 2009, ECMAScript 5.0 was released
- In 2011, ECMAScript 5.1 was released
- In 2015, ECMAScript 6 was released and renamed “ECMAScript 2015”. This is because the TC39 Committee plans to release one version of ECMAScript each year, with the next version in 2016 called “ECMAScript 2016”, the next in 2017 called “ECMAScript 2017”, and so on.
This paper mainly refers to:
- Network Channel (WangDoc.com)
- Baidu encyclopedia