30 seconds of codeBack to Home
Returns an array of function property names from own (and optionally inherited) enumerable properties of an object.
Object.keys(obj) to iterate over the object's own properties.
Object.get.PrototypeOf(obj) to also get the object's inherited properties.
Array.prototype.filter() to keep only those properties that are functions.
Omit the second argument,
inherited, to not include inherited properties by default.