get object methods js code example Example: javascript check object methods Object.getOwnPropertyNames()