Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[es] Web/JavaScript/Reference/Global_Objects/Map/size #23215

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: Map.prototype.size
slug: Web/JavaScript/Reference/Global_Objects/Map/size
l10n:
sourceCommit: 6a0f9553932823cd0c4dcf695d4b4813474964fb
---

{{JSRef}}

La propiedad de acceso **`size`** de las instancias {{jsxref("Map")}} regresa el número de elementos de este _map_.

{{EmbedInteractiveExample("pages/js/map-prototype-size.html")}}

## Descripción

El valor de `size` es un entero que representa, el número de entradas que el objeto `Mqp` tiene. La función de acceso para `size` es `undefined`; no puedes modificar esta propiedad.
Graywolf9 marked this conversation as resolved.
Show resolved Hide resolved

## Ejemplos

### Usando size

```js
const myMap = new Map();
myMap.set("a", "alpha");
myMap.set("b", "beta");
myMap.set("g", "gamma");

console.log(myMap.size); // 3
```

## Especificaciones

{{Specifications}}

## Compatibilidad con nvegadores

{{Compat}}

## Véase también

- {{jsxref("Map")}}