Skip to content

Instantly share code, notes, and snippets.

@sTiLL-iLL
Created August 4, 2013 18:48
Show Gist options
  • Save sTiLL-iLL/6151423 to your computer and use it in GitHub Desktop.
Save sTiLL-iLL/6151423 to your computer and use it in GitHub Desktop.
4 all Items in a list loop logic
// on every "yada" in "yada"....
function onEachIn(object, action) {
try {
for (var property in object) {
if (Object.prototype.hasOwnProperty.call(object, property))
action(property, object[property]);
}
} catch (e) {
throw e;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment