Web APIs
DOMTokenList.remove()
Remove specified tokens, leaving other tokens untouched. Missing tokens have no effect. Example console output: note.
Formal Syntax & Structure
javascript syntaxjavascript
tokens.remove(...tokensToRemove)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| tokensToRemove | string[] | Variadic individual tokens. |
Return Value
undefined
No result value.
Working Example
Example Snippetjavascript
const p=document.createElement("p"); p.className="note active"; p.classList.remove("active","missing"); console.log(p.className);