Skip to content

Instantly share code, notes, and snippets.

@danielcranney
Last active April 20, 2021 19:32
Show Gist options
  • Save danielcranney/2a8322918388f030e2ba80ac0cd465d3 to your computer and use it in GitHub Desktop.
Save danielcranney/2a8322918388f030e2ba80ac0cd465d3 to your computer and use it in GitHub Desktop.
Check Object for Empty Values
function checkEmptyValues(obj) {
for (var key in obj) {
if (obj[key] === "") {
// Do something
return;
} else {
// Do something else
}
}
}
checkEmptyValues(finalReport);
@danielcranney
Copy link
Author

This is a simple function that checks for empty values in an object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment