function isEmpty(obj) {
    for(var key in obj) {
        if(obj.hasOwnProperty(key))
        return false
    }
    return true
}

let obj = {
    name: "Sameer",
    age: 21,
    city: "Patna"
}

console.log(isEmpty(obj))

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: