-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,682
  • 3
  • 25
  • 52

1 Answers1

-3

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

console.log(
  Object.keys(obj)
);
iAmOren
  • 2,760
  • 2
  • 11
  • 23