Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript test for empty object

// because Object.entries(new Date()).length === 0;
// we have to do some additional check
Object.entries(obj).length === 0 && obj.constructor === Object
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #test #empty #object
ADD COMMENT
Topic
Name
2+3 =