Object.getOwnPropertyNames() example

Unlike the Object.keys(), Object.values() and Object.entries() methods, which only return enumerable properties, the Object.getOwnPropertyNames() method returns an array whose elements are strings corresponding to the enumerable and non-enumerable property names found in the object

As with the previous methods, this is done without fetching properties from the Prototype chain.

Read more at: https://imelgrat.me/javascript/object-properties-iteration-in-javascript/