-1

I have next object:

const obj = {
  size: 2,
  length: 34,
  status: 0,
}

I need to get keys of objects as string: obj.size -> 'size', without using loops.

Ted
  • 1,422
  • 3
  • 22
  • 40

1 Answers1

-3

var obj = {
  size: 2,
  length: 34,
  status: 0,
};

console.log(
  Object.keys(obj)
);
iAmOren
  • 2,638
  • 2
  • 10
  • 23