Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

javascript
communitycreator

What are the key features of ECMAScript?

Silvija Prozinger

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 let and const were 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 the while, for, do/while, if/else, and switch statements.
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()
  • Dynamic – it is dynamically typed, which means a type is associated with a value rather than an expression.
  • Functional - functional programming is a declarative programming paradigm where programs are constructed by applying and composing functions. The declarative programming paradigm is where function definitions are trees of expressions that each return a value.
  • Prototype-based – ECMAScript is prototype-based, rather than class-based, like many other programming languages. This means that, while class-based languages have the concept of two distinct entities (classes and instances), ECMAScript doesn't make that distinction; it simply has objects that specify their own properties. In addition, any object can be associated as the prototype for another object. This lets the second object share the first object's properties.
  • RELATED TAGS

    javascript
    communitycreator
    RELATED COURSES

    View all Courses

    Keep Exploring