History and naming
Imperative and structured
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.