Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript list class properties

function getClassProperties(instanceOfClass) {
  const proto = Object.getPrototypeOf(instanceOfClass);
  const names = Object.getOwnPropertyNames(proto);
  return names.filter(name => name != 'constructor');
}
 
PREVIOUS NEXT
Tagged: #javascript #list #class #properties
ADD COMMENT
Topic
Name
8+6 =