how to list all methods of an object in javascript code example Example: list methods of object js Object.getOwnPropertyNames(obj)