Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* 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
You can’t perform that action at this time.