How can you get the list of keys of any object

Posted by Jennifer | Updated on

You can use the Object.keys() method which is used to return an array of a given object’s own property names, in the same order as we get with a normal loop. For example, you can get the keys of a user object,

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers