ECMAScript 5

The EMCAScript 5 (a.k.a. ES5) standard specifies a number of methods and features that are not necessarily implemented in all browsers and especially older version of browsers (in particular IE8.) We have included an implementation of these missing methods and features, which is only instantiated if not implemented by the current browser. The ES5 methods and features implemented are defined as follows:

Method  SpecificationOmitted
Object.keys EMCAScript 5IE8, FF3, SF4, OP10-11, Konq
Array.isArray EMCAScript 5IE8, FF3, SF4, Konq
Array.prototype.every EMCAScript 5IE8
Array.prototype.filter EMCAScript 5IE8
Array.prototype.forEach EMCAScript 5IE8
Array.prototype.forEachUntil E&A Enhancement(all)
Array.prototype.indexOf EMCAScript 5IE8
Array.prototype.isEmpty EMCAScript 5IE8
Array.prototype.lastIndexOf EMCAScript 5IE8
Array.prototype.peek E&A Enhancement(all)
Array.prototype.reduce EMCAScript 5IE8

function Object.keys(obj)

Returns the names of the enumerable properties and methods of an object.

Object to get the names of the enumerate properties of.
  • If "obj" is null or not an object or array, then an empty array is returned.
  • If "obj" is an array, then an array of integers containing valid indices for the array.
  • If "obj" is not null and an object, then an array of strings containing the names of the properties and methods excluding the methods in the contructor prototype.
The following objects may be thrown by this method:
TypeError("Argument is not an object.")
If object is null or "typeof" method does not return "object".

The name of each property in the specified object is obtained using a “for (var prop in obj)” loop. If the object has a constructor then properties in the “obj.constructor.prototype” object are excluded. If the object is an array then this method returns the list of valid indices for the array.

Under Construction