Search
We can get all the keys of an object using Object.keys(). It returns the keys as an array of strings.
Object.keys()
In the example given below, we are getting all the keys stored in the person object.
person