empty a javascript object code example
Example 1: javascript check if object is empty
function isObjectEmpty(obj) {
return Object.keys(obj).length === 0;
}
Example 2: how to initialize empty javascript object
let obj = {};
Example 3: javascript create object empty
var empty_obj = {};