Web APIs

FormData.delete()

Try the free JavaScript compiler

Remove every entry with this name. Example console output: 0.

Formal Syntax & Structure

javascript syntaxjavascript
data.delete(name)

Parameters & Attributes

NameTypeDescription
namestringField name.

Return Value

undefined

No result value.

Working Example

Example Snippetjavascript
const data=new FormData(); data.append("tag","a"); data.append("tag","b"); data.delete("tag"); console.log(data.getAll("tag").length);
JavaScript Reference