| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Set/delete | [Back] [Original] |
Get to know MDN better
Esta pgina foi traduzida do ingls pela comunidade. Saiba mais e junte-se comunidade MDN Web Docs.
This feature is well established and works across many devices and browser versions. Its been available across browsers since julho de 2015.
O mtodo delete() remove o elemento especificado de um objeto Set.
mySet.delete(value);
Requerido. O valor do elemento a ser removido do objeto Set.
Retorna true se um elemento contido no objeto Set foi removido com sucesso; caso contrrio false.
deletevar mySet = new Set();
mySet.add("foo");
mySet.delete("bar"); // Retorna false. Nenhum elemento "bar" foi encontrado para deletar.
mySet.delete("foo"); // Retorna true. remoo bem sucedida.
mySet.has("foo"); // Retorna false. O elemento "foo" no est mais presente.
| Specification |
|---|
| ECMAScript 2027 LanguageSpecification # sec-set.prototype.delete |
This page was last modified on 8 de nov. de 2023 by MDN contributors.
SetObject/FunctionObject.prototype.__defineGetter__()Object.prototype.__defineSetter__()Object.prototype.__lookupGetter__()Object.prototype.__lookupSetter__()Object.prototype.hasOwnProperty()Object.prototype.isPrototypeOf()Object.prototype.propertyIsEnumerable()Object.prototype.toLocaleString()Object.prototype.toString()Object.prototype.valueOf()Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |