findallmethods function in javascript code example Example: javascript check object methods Object.getOwnPropertyNames()