ECMAScript

From Canonica AI

Overview

ECMAScript is a scripting-language specification standardized by ECMA International in ECMA-262 and ISO/IEC 16262. It was created to standardize JavaScript, so as to foster multiple independent implementations. JavaScript has remained the best-known implementation of ECMAScript since its inception, with other well-known implementations including JScript and ActionScript.

History

ECMAScript was initially created to standardize JavaScript, which Netscape Communications Corporation developed. Netscape had submitted JavaScript to ECMA International for consideration, leading to the adoption of the first edition of ECMA-262 in June 1997. The standard has since undergone several revisions, with the 11th edition published in June 2020.

Syntax

ECMAScript syntax is C-style, with semicolons used to separate statements. It supports object-oriented programming with object prototypes, instead of classes, and supports closures and lambdas.

A screenshot of ECMAScript code highlighting its syntax.
A screenshot of ECMAScript code highlighting its syntax.

Features

ECMAScript includes features such as dynamic typing, prototype-based object-orientation, and first-class functions. Some of these features are not found in other languages with C-style syntax, such as Java and C++. ECMAScript also includes several built-in objects, such as String, Date, and Math.

Implementations

JavaScript is the most well-known implementation of ECMAScript, and is used for client-side scripting on the web. Other implementations include JScript, which Microsoft developed for use in its Internet Explorer web browser, and ActionScript, used in the Adobe Flash platform.

Usage

ECMAScript is primarily used for client-side scripting on the web, with JavaScript being used in all modern web browsers. It is also used in server-side applications, with Node.js being a popular choice for server-side JavaScript.

See Also