Object.keys

Object.keys

Object.keys

Function

Returns an array of object key names.

Syntax

Parameters

No parameters.

Return value

TypeDescription
ArrayReturns a string array of key names.

Example

Notes

  • Key order maintains the current insertion order of objects.