An array is an ordered collection of values. Each value is called an element, and each element has a numeric position in the array, known as its index.
For non sparse arrays, this property specifies the number of elements in the array.
For sparse arrays, length is larger than the index of all elements.
The writable attribute specifics whether the value of the property can be set.
The enumerable attribute specifies whether the property name is returned by a for/in loop.
The configurable attribute specifies whether the property can be deleted and whether its attributes can be altered.
Prior to ECMAScript 5, all properties in objects created by your code are writable, enumerable, and configurable. In ECMAScript 5, you can configure the attributes of your properties. 6.7 explains how to do this:
Functions are defined with the function keyword, which can be used in. A function definition expression, or in a function declaration statement. In either form, function definitions begin with the keyword function followed by these components:
An identifier that names the function. The name is a required part of function declaration statements:
A pair of parentheses around a comma-separated list of zero or more identifiers.
Notice that a function defined as an expression is only useful if it is part of a larger expression, such as an assignment or invocation, that does something with the newly defined function.