How to remove a property from a JavaScript object

Hello guys,

Javascript object is pair of key/value. If you want to access any value from the Javscript object, you can access using object.key or object['key'] syntax.

In this article we will share how you can remove any property from the Javscript object. 

Here is below code to remove property from the Javscript object.

var person = {
    firstName: "John",
    lastName: "Doe",
    email: "^[email protected]"

// or another way
delete person['email'];


This way you can remove property from Javascript object.

Thank you for giving time to read the article. I hope you like this article.