imelgrat / object-getownpropertynames-iteration-example

Object.getOwnPropertyNames() example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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/

About

Object.getOwnPropertyNames() example


Languages

Language:JavaScript 61.1%Language:HTML 38.9%