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 in ECMAScript 2016 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.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support No No No No No No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidIE mobileOpera AndroidiOS Safari
Basic support No No No No No No No

See also

Document Tags and Contributors

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