Last active
April 20, 2021 19:32
-
-
Save danielcranney/2a8322918388f030e2ba80ac0cd465d3 to your computer and use it in GitHub Desktop.
Check Object for Empty Values
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
function checkEmptyValues(obj) { | |
for (var key in obj) { | |
if (obj[key] === "") { | |
// Do something | |
return; | |
} else { | |
// Do something else | |
} | |
} | |
} | |
checkEmptyValues(finalReport); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a simple function that checks for empty values in an object.