JavaScript handler.ownKeys() Method

The handler.ownKeys() method of JavaScript is used to return an enumerable object. This method is a trap for Reflect.ownKeys().

Syntax

Parameters

target: The target object.

Return value

Return an enumerable object.

Browser Support

Chrome49
Edge12
Firefox18
Opera36

Example 1

Test it Now

Output:

Use handler.ownKeys() is a,b,c

Example 2

Test it Now

Output:

Age Count 

Example 3

Test it Now

Output:

in ownKeys method foo 
in ownKeys method foo,variable





Latest Courses