var oii = { name: "jigar", work: "it", myname: { firstname: "jigar", lastname: "kajiwala" } } if (Object.keys(oii).length != 0) { console.log(`oii is not empty`); //oii is not empty console.log(Object.keys(oii).length); //3 }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter