Skip to content

Instantly share code, notes, and snippets.

@gartenfeld
Created December 3, 2014 14:25
Show Gist options
  • Save gartenfeld/4aa34ea3c40af4394d9b to your computer and use it in GitHub Desktop.
Save gartenfeld/4aa34ea3c40af4394d9b to your computer and use it in GitHub Desktop.
Find out what methods an object has.
var methods = [];
for (var prop in object) {
if (typeof object[prop] === "function") {
methods.push(prop);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment