Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript display, show properties of object

const user = {
    name: 'Alex',
    age: 30
};

const props = Object.getOwnPropertyNames(user);

console.log(props);    // [ 'name', 'age' ]
Source by attacomsian.com #
 
PREVIOUS NEXT
Tagged: #javascript #show #properties #object
ADD COMMENT
Topic
Name
2+4 =