Created
December 3, 2014 14:25
-
-
Save gartenfeld/4aa34ea3c40af4394d9b to your computer and use it in GitHub Desktop.
Find out what methods an object has.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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