Skip to content

Commit 7d67a6e

Browse files
authored
Merge pull request #1050 from lakshyatyagi24/patch-1
Create isEmptyObject.js
2 parents 39ea1c7 + 9c36e70 commit 7d67a6e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

isEmptyObject.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// JS Function to find object is empty or not
2+
3+
function isObjectEmpty(obj) {
4+
for (var key in obj) {
5+
if (obj.hasOwnProperty(key))
6+
return false;
7+
}
8+
return true;
9+
}

0 commit comments

Comments
 (0)