by @saigowthamr

How to remove property from a JavaScript object

Home » javascript » How to remove property from a JavaScript object

This simple example will show you how to remove a property from a JavaScript object using delete keyword.

const obj ={
    a:1,
    b:2,
    c:12
}

delete obj.a //  or delete obj['a']

The delete keyword deletes the object property and value.