delete - JavaScript | MDN

developer.mozilla.org

Tin mới

HTML: Markup language

See all HTML references

Date & time formats

See all HTML guides

CSS: Styling language

See all CSS references

See all CSS guides

Centering an element

JavaScript: Scripting language

Standard built-in objects

Expressions & operators

Statements & declarations

See all JavaScript references

Control flow & error handing

Loops and iteration

Working with objects

See all JavaScript guides

Web APIs: Programming interfaces

Service worker API

Using the Web animation API

Using the Fetch API

Working with the History API

Using the Web speech API

All web technology

Progressive web apps

Learn web development

Getting started modules

Structuring content with HTML module

CSS styling basics module

Dynamic scripting with JavaScript module

Border-image generator

Border-radius generator

Box-shadow generator

Color format converter

Object.defineProperty()

Deleting array elements

When you delete an array element, the array length is not affected. This holds even if you delete the last element of the array.

Deleting array elements

When you delete an array element, the array length is not affected. This holds even if you delete the last element of the array.

Deleting non-configurable properties

When a property is marked as non-configurable, delete won't have any effect, and will return false. In strict mode, this will raise a TypeError.

Deleting global properties

If a global property is configurable (for example, via direct property assignment), it can be deleted, and subsequent references to them as global variables will produce a ReferenceError.

Reflect.deleteProperty()

Map.prototype.delete()

Learn how to contribute

This page was last modified on Jul 17, 2025 by MDN contributors.

Expressions and operators

Numbers and strings

Representing dates & times

Regular expressions

JavaScript typed arrays

Iterators and generators

Resource management

Internationalization