JavaScript: Get property descriptors of object
10 April 2023 (Updated 10 April 2023)
const obj = {
name: "John",
age: 30
}
const propertyDescriptors = Object.getOwnPropertyDescriptors(obj)
console.log(propertyDescriptors)
Output:
Sources
Tagged:
JavaScript
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment