How do I return the key name rather than the value?

How do I return the key name rather than the value?
0.0 0

#1

anyone know how to return a property name of an object rather than the value

function getAlbumProperties (obj)
 {
  
  
  return obj.a

  
  
  

}


getAlbumProperties({a: 'foo', b: 'car', c: 'bar'} )

E.g. {a: ‘foo’, b: ‘car’, c: ‘bar’} should return [‘a’, ‘b’, ‘c’]


#2

Object.keys(obj) This returns keys that belong to obj as an array.


#3

cool and
Object.values(obj) works too thanks