How to get all property names from an object in JavaScript?
Originally posted here!
Let's consider an object called John.
const John = {
name: "John Doe",
age: 32,
bio: "John Doe is a great guy",
};
We can get all the properties in this object using the Object.getOwnPropertyNames() method.
const John ...
melvingeorge-me.hashnode.dev1 min read