From a55b575e8089ee6cab7c5c262a7e6db55d0e34d6 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:46:50 +0100 Subject: unslug es: move --- .../reference/global_objects/set/has/index.html | 124 +++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 files/es/web/javascript/reference/global_objects/set/has/index.html (limited to 'files/es/web/javascript/reference/global_objects/set/has') diff --git a/files/es/web/javascript/reference/global_objects/set/has/index.html b/files/es/web/javascript/reference/global_objects/set/has/index.html new file mode 100644 index 0000000000..e133de2d00 --- /dev/null +++ b/files/es/web/javascript/reference/global_objects/set/has/index.html @@ -0,0 +1,124 @@ +--- +title: Set.prototype.has() +slug: Web/JavaScript/Referencia/Objetos_globales/Set/has +tags: + - ECMAScript6 + - JavaScript + - Prototype + - set +translation_of: Web/JavaScript/Reference/Global_Objects/Set/has +--- +
{{JSRef}}
+ +

El método has() retorna un booleano indicando si el elemento especificado existe en el objeto Set o no.

+ +

Syntaxis

+ +
mySet.has(value);
+ +

Parametros

+ +
+
valor
+
Requerido. El valor del cual se probará su presencia en el objeto Set.
+
+ +

Valor de retorno

+ +
+
Booleano
+
Retorna true si el elemento con el valor especificado existe en el objeto  Set; de otra manera retorna false.
+
+ +

Ejemplos

+ +

Usando el método has

+ +
var mySet = new Set();
+mySet.add("foo");
+
+mySet.has("foo");  // retorna true
+mySet.has("bar");  // retorna false
+
+ +

Especificaciones

+ + + + + + + + + + + + + + + + + + + +
EspecificaciónEstadoComentario
{{SpecName('ES6', '#sec-set.prototype.has', 'Set.prototype.has')}}{{Spec2('ES6')}}Definición inicial.
{{SpecName('ESDraft', '#sec-set.prototype.has', 'Set.prototype.has')}}{{Spec2('ESDraft')}} 
+ +

Compatibilidad de navegadores

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Soporte básico38{{CompatGeckoDesktop("13.0")}}11257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Soporte básico{{CompatNo}}38{{CompatGeckoMobile("13.0")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Ver también

+ + -- cgit v1.2.3-54-g00ecf