The delete JavaScript operator is used to delete a property from an object.

Say you have this object:

const car = {
  model: 'Fiesta',
  color: 'green'

You can delete any property from it, or method, using the delete operator:

delete car.model

You can also reference the property/method using the brackets syntax:

delete car['color']

Download my free JavaScript book!

But.. wait! Don't stop here.

I created a premium training program that will transform you, quickly, into an excellent JavaScript developer. Practical lessons to learn the 80% of the JavaScript that you need, in 20% of the time!

⬇️ ⬇️ ⬇️

Sign up to the JavaScript Course now!

⬆️ ⬆️ ⬆️