sajad torkamani
const obj = {
  name: "John",
  age: 30
}

const propertyDescriptors = Object.getOwnPropertyDescriptors(obj)

console.log(propertyDescriptors)

Output:

Sources

Tagged: JavaScript

Leave a comment

Your email address will not be published. Required fields are marked *