Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Reflect.enumerate()

Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

The static Reflect.enumerate() method used to return an iterator with the enumerable own and inherited properties of the target object, but has been removed from the ECMAScript standard in edition 7 and is deprecated in browsers.

Syntax

Reflect.enumerate(target)

Parameters

target
The target object on which to get the property.

Return value

An iterator with the enumerable own and inherited properties of the target object.

Exceptions

A TypeError, if target is not an Object.

Description

The Reflect.enumerate method returns an iterator with the enumerable own and inherited properties of the target object.

Examples

Using Reflect.enumerate()

var obj = { x: 1, y: 2 };

for (var name of Reflect.enumerate(obj)) {
  console.log(name);
}
// logs "x" and "y"

Specifications

Specification Status Comment
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'Reflect.enumerate' in that specification.
Standard Initial definition. Removed in ECMAScript 2016 (ES7).

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support No support No support No support No support No support
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support No support No support No support No support No support No support

See also

Document Tags and Contributors

 Contributors to this page: fscholz, gingerik
 Last updated by: fscholz,