-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[es] Web/JavaScript/Reference/Global_Objects/Map/delete (#23193)
[es] translate map delete
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
files/es/web/javascript/reference/global_objects/map/delete/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
title: Map.prototype.delete() | ||
slug: Web/JavaScript/Reference/Global_Objects/Map/delete | ||
l10n: | ||
sourceCommit: 88d71e500938fa8ca969fe4fe3c80a5abe23d767 | ||
--- | ||
|
||
{{JSRef}} | ||
|
||
El método **`delete()`** de las instancias {{jsxref("Map")}} remueve el elemento especificado de este _map_ utilizando la llave del elemento que se quiere remover. | ||
|
||
{{EmbedInteractiveExample("pages/js/map-prototype-delete.html")}} | ||
|
||
## Sintaxis | ||
|
||
```js-nolint | ||
mapInstance.delete(key) | ||
``` | ||
|
||
### Parámetros | ||
|
||
- `key` | ||
- : La llave de el elemento que se va a remover del objeto `Map`. | ||
|
||
### Valor devuelto | ||
|
||
`true` si un elemento en el objeto `Map` existía y fué removido, o `false` si el elemento no existe. | ||
|
||
## Ejemplos | ||
|
||
### Usando delete() | ||
|
||
```js | ||
const myMap = new Map(); | ||
myMap.set("bar", "foo"); | ||
|
||
console.log(myMap.delete("bar")); // Regresa true. Removido exitosamente. | ||
console.log(myMap.has("bar")); // Regresa false. El elemento "bar" ya no esta presente. | ||
``` | ||
|
||
## Especificaciones | ||
|
||
{{Specifications}} | ||
|
||
## Compatibilidad con navegadores | ||
|
||
{{Compat}} | ||
|
||
## Véase también | ||
|
||
- {{jsxref("Map")}} |