Favorites

JavaScript delete Operator

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
delete
JavaScript Unary OperatorThis operator is supported by all modern browsers.
Updated 28th November 2026

The delete operator removes a property from an object.

Description

The delete operator removes a property from an object and returns true if it succeeded (or the property didn't exist). It can't delete variables, and in strict mode deleting a non-configurable property, such as one on a frozen object, throws a TypeError.

Using delete on an array element leaves an empty slot rather than shifting elements; use splice() to remove elements. For collections that change often, a Map with its delete() method is usually faster.

delete only removes the object's own property; if the prototype has a property with the same name, it becomes visible again. It returns true even when the property didn't exist, so the return value is rarely useful. Deleting properties can make some engines treat an object as a "dictionary", which may slow down property access, so for frequently changing data a Map is usually a better fit.

Properties

Operator
delete
Category
Unary
Precedence
14 (1 is lowest, 18 is highest)
Associativity
right-to-left

Syntax

delete object.property
delete object[key]

Example

const user = { name: 'Sam', password: 'secret' };
delete user.password;
console.log(user, 'password' in user);

const arr = ['a', 'b', 'c'];
delete arr[1];
console.log(arr, arr.length);

Browser Support

The following information will show you the current browser support for the delete operator. Hover over a browser icon to see the version that first introduced support for this operator.

This operator is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee