What are the key features of ECMAScript?
ECMAScript is a general-purpose programming language, standardized by the European Computer Manufacturers Association (ECMA). ECMAScript itself is a programming language that was created as a JavaScript standard to ensure interoperability of Web pages across different Web browsers.
The ECMAScript specification was developed by Brendan Eich, the creator of JavaScript. So far, there have been 11 editions of ECMAScript. Each edition releases significant changes and additions to JavaScript, the latest one being ECMAScript 2020.
What features does ECMAScript have?
The ECMAScript language includes the following features:
- Imperative and structured – it supports C style structured programming, with some dissimilarities in scoping implementation, such as in ECMAScript 2015 when the keywords
letandconstwere added that support block scoping as well as function scoping and omit semicolons which are necessary in C. The main similarity is that control flow is done with thewhile,for,do/while,if/else, andswitchstatements.
function func() {// x is known here but not defined.console.log('value of x here: ', x){var x = 10;x = x + 5;}// x is still known here and has a value.console.log('value of x after for block: ', x)}// x is NOT known here.func()