The following features are common to all conforming ECMAScript implementations, unless explicitly specified otherwise.
Imperative and structured
Dynamic dynamic typing
objects as associative arrays
Functions are first-class; they are objects themselves. As such, they have properties and can be passed around and interacted with like any other object.
inner functions and closures
functions as object constructors
Functions double as object constructors along with their typical role. Prefixing a function call with new creates a new object and calls that function with its local this keyword bound to that object for that invocation. The function’s prototype property determines the new object’s prototype.
functions as methods
Unlike many object-oriented languages, there is no distinction between a function definition and a method definition. Rather, the distinction occurs during function calling; a function can be called as a method. When a function is invoked as a method of an object, the function’s local this keyword is bound to that object for that invocation.
An indefinite number of parameters can be passed to a function. The function can both access them through formal parameters and the local arguments object.
array and object literals
Like many scripting languages, arrays and objects (associative arrays in other languages) can each be created with a succinct shortcut syntax. In fact, these literals form the basis of the JSON data format.