Object.getOwnPropertyNames() JavaScript
The Javascript Object getOwnPropertyNames() method retrieves an array of all direct properties of the object. It will exclude non-enumerable properties which use symbols. Syntax: Object.getOwnPropertyNames(object) Parameters: object: It represents the object whose all direct properties have to be fetched. Return: An array of all direct properties of the object. Example: <!DOCTYPE html> <html> <body> <script> … Read more