Last active
April 14, 2016 15:59
-
-
Save kevinweber/d95a504da6a0a51dd2104a2076cefcef to your computer and use it in GitHub Desktop.
This file contains 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
/** | |
* Loop through an object and call a passed function | |
*/ | |
function loopObject(object, func) { | |
var property; | |
for (property in object) { | |
if (object.hasOwnProperty(property)) { | |
func(property, object); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment