javascript object properties witout functions code example
Example 1: javascript list class properties
function getClassProperties(instanceOfClass) {
const proto = Object.getPrototypeOf(instanceOfClass);
const names = Object.getOwnPropertyNames(proto);
return names.filter(name => name != 'constructor');
}
Example 2: adding function to objects js
var myObj = {
myFunc: function(param){
//do stuff
}
}