diff --git a/curriculum/challenges/chinese/01-responsive-web-design/basic-css/change-a-variable-for-a-specific-area.md b/curriculum/challenges/chinese/01-responsive-web-design/basic-css/change-a-variable-for-a-specific-area.md
index 92be37fe79..5ee455100c 100644
--- a/curriculum/challenges/chinese/01-responsive-web-design/basic-css/change-a-variable-for-a-specific-area.md
+++ b/curriculum/challenges/chinese/01-responsive-web-design/basic-css/change-a-variable-for-a-specific-area.md
@@ -23,7 +23,7 @@ dashedName: change-a-variable-for-a-specific-area
```js
assert(
- code.match(/.penguin\s*?{[\s\S]*--penguin-belly\s*?:\s*?white\s*?;[\s\S]*}/gi)
+ code.match(/\.penguin\s*?{[\s\S]*(? PROCESS -> OUTPUT`
+```js
+INPUT -> PROCESS -> OUTPUT
+```
La programación funcional se refiere a:
-1) Funciones aisladas: sin dependencia alguna del estado del programa, que incluye variables globales sujetas a cambios
+1) Funciones aisladas: sin dependencia alguna del estado del programa, el cual incluye variables globales sujetas a cambios
2) Funciones puras: una misma entrada siempre da la misma salida
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/arguments-optional.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/arguments-optional.md
index 4c2a35e370..d63ef92ad9 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/arguments-optional.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/arguments-optional.md
@@ -14,7 +14,9 @@ Por ejemplo, `addTogether(2, 3)` debe devolver `5` y `addTogether(2)` debe devol
Si se llama a esta función devuelta con un solo argumento, se obtendrá la suma:
-`var sumTwoAnd = addTogether(2);`
+```js
+var sumTwoAnd = addTogether(2);
+```
`sumTwoAnd(3)` devuelve `5`.
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/define-a-constructor-function.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/define-a-constructor-function.md
index ffc215f1f6..d192ce79f3 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/define-a-constructor-function.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/define-a-constructor-function.md
@@ -1,6 +1,6 @@
---
id: 587d7dad367417b2b2512b77
-title: Define a Constructor Function
+title: Define una función "Constructor"
challengeType: 1
forumTopicId: 16804
dashedName: define-a-constructor-function
@@ -8,9 +8,9 @@ dashedName: define-a-constructor-function
# --description--
-Constructors are functions that create new objects. They define properties and behaviors that will belong to the new object. Think of them as a blueprint for the creation of new objects.
+Las funciones Constructors crean nuevos objetos. Definen propiedades y comportamientos que pertenecerán al nuevo objeto. Piensa que son el modelo para la creación de nuevos objetos.
-Here is an example of a constructor:
+A continuación se muestra un ejemplo de un constructor:
```js
function Bird() {
@@ -20,29 +20,29 @@ function Bird() {
}
```
-This constructor defines a `Bird` object with properties `name`, `color`, and `numLegs` set to Albert, blue, and 2, respectively. Constructors follow a few conventions:
+Este constructor define un objeto `Bird` con las propiedades `name`, `color` y `numLegs` establecidas a Albert, blue y 2 respectivamente. Los constructores tienen las siguientes convenciones:
-
- Constructors are defined with a capitalized name to distinguish them from other functions that are not
constructors
. - Constructors use the keyword
this
to set properties of the object they will create. Inside the constructor, this
refers to the new object it will create. - Constructors define properties and behaviors instead of returning a value as other functions might.
+- Están definidos con un nombre en mayúscula para distinguirlos de otras funciones que no son
constructors
. - Utilizan la palabra clave
this
para establecer propiedades del objeto que crearán. Dentro del constructor, this
se refiere al nuevo objeto que creará. - Los Constructors definen propiedades y comportamientos en ves de devolverlos como un valor como lo harían otras funciones.
# --instructions--
-Create a constructor, `Dog`, with properties `name`, `color`, and `numLegs` that are set to a string, a string, and a number, respectively.
+Crea un constructor, `Dog`, con las propiedades `name`, `color` y `numLegs` que se establecen a una cadena, una cadena y un número respectivamente.
# --hints--
-`Dog` should have a `name` property set to a string.
+`Dog` debe tener una propiedad `name` establecida a una cadena.
```js
assert(typeof new Dog().name === 'string');
```
-`Dog` should have a `color` property set to a string.
+`Dog` debe tener una propiedad `color` establecida a una cadena.
```js
assert(typeof new Dog().color === 'string');
```
-`Dog` should have a `numLegs` property set to a number.
+`Dog` debe tener una propiedad `numLegs` establecida a un número.
```js
assert(typeof new Dog().numLegs === 'number');
@@ -51,7 +51,9 @@ assert(typeof new Dog().numLegs === 'number');
# --seed--
## --seed-contents--
+
```js
+
```
# --solutions--
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/make-code-more-reusable-with-the-this-keyword.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/make-code-more-reusable-with-the-this-keyword.md
index fc3324f479..08e6f32e8c 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/make-code-more-reusable-with-the-this-keyword.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/make-code-more-reusable-with-the-this-keyword.md
@@ -1,6 +1,6 @@
---
id: 587d7dad367417b2b2512b76
-title: Make Code More Reusable with the this Keyword
+title: Haz el código más reutilizable con la palabra clave "this"
challengeType: 1
forumTopicId: 301321
dashedName: make-code-more-reusable-with-the-this-keyword
@@ -8,13 +8,15 @@ dashedName: make-code-more-reusable-with-the-this-keyword
# --description--
-The last challenge introduced a method to the `duck` object. It used `duck.name` dot notation to access the value for the `name` property within the return statement:
+El último desafío introdujo un método al objeto `duck`. Usó la notación de puntos `duck.name` para acceder al valor de la propiedad `name` dentro de la declaración de retorno:
-`sayName: function() {return "The name of this duck is " + duck.name + ".";}`
+```js
+sayName: function() {return "The name of this duck is " + duck.name + ".";}
+```
-While this is a valid way to access the object's property, there is a pitfall here. If the variable name changes, any code referencing the original name would need to be updated as well. In a short object definition, it isn't a problem, but if an object has many references to its properties there is a greater chance for error.
+Aunque esta es una forma válida de acceder a la propiedad del objeto, existe un problema. Si el nombre de la variable cambia, cualquier código que haga referencia al nombre original también tendría que ser actualizado. En una definición breve de un objeto, esto no es un problema, pero si un objeto tiene muchas referencias a sus propiedades hay una mayor probabilidad de error.
-A way to avoid these issues is with the `this` keyword:
+Una forma de evitar estos problemas es con palabra clave `this`:
```js
let duck = {
@@ -24,21 +26,21 @@ let duck = {
};
```
-`this` is a deep topic, and the above example is only one way to use it. In the current context, `this` refers to the object that the method is associated with: `duck`. If the object's name is changed to `mallard`, it is not necessary to find all the references to `duck` in the code. It makes the code reusable and easier to read.
+`this` es un tema profundo, y el ejemplo anterior es sólo una forma de usarlo. En el contexto actual, `this` se refiere al objeto con el que el método está asociado: `duck`. Si el nombre del objeto se cambia a `mallard`, no es necesario encontrar todas las referencias a `duck` en el código. Hace que el código sea reutilizable y mas fácil de leer.
# --instructions--
-Modify the `dog.sayLegs` method to remove any references to `dog`. Use the `duck` example for guidance.
+Modifica el método `dog.sayLegs` para eliminar cualquier referencia a `dog`. Utiliza el ejemplo de `duck` como orientación.
# --hints--
-`dog.sayLegs()` should return the given string.
+`dog.sayLegs()` debe devolver una cadena.
```js
assert(dog.sayLegs() === 'This dog has 4 legs.');
```
-Your code should use the `this` keyword to access the `numLegs` property of `dog`.
+Tu código debe usar la palabra clave `this` para acceder a la propiedad `numLegs` de `dog`.
```js
assert(code.match(/this\.numLegs/g));
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-constructor-property.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-constructor-property.md
index 6d1fd731db..abb7d4e341 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-constructor-property.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-constructor-property.md
@@ -1,6 +1,6 @@
---
id: 587d7daf367417b2b2512b7e
-title: Understand the Constructor Property
+title: Entiende la propiedad constructor
challengeType: 1
forumTopicId: 301327
dashedName: understand-the-constructor-property
@@ -8,17 +8,19 @@ dashedName: understand-the-constructor-property
# --description--
-There is a special `constructor` property located on the object instances `duck` and `beagle` that were created in the previous challenges:
+Hay una propiedad especial `constructor` ubicada en instancias de objeto `duck` y `beagle` que fueron creados en desafíos anteriores:
```js
let duck = new Bird();
let beagle = new Dog();
-console.log(duck.constructor === Bird); //prints true
-console.log(beagle.constructor === Dog); //prints true
+console.log(duck.constructor === Bird);
+console.log(beagle.constructor === Dog);
```
-Note that the `constructor` property is a reference to the constructor function that created the instance. The advantage of the `constructor` property is that it's possible to check for this property to find out what kind of object it is. Here's an example of how this could be used:
+Ambas llamadas `console.log` devolverían `true` en la consola.
+
+Ten en cuenta que la propiedad `constructor` hace referencia a la función constructor que creo la instancia. La ventaja de la propiedad `constructor` es que es posible verificar esta propiedad para averiguar qué tipo de objeto es. Así es como se podría utilizar:
```js
function joinBirdFraternity(candidate) {
@@ -30,28 +32,27 @@ function joinBirdFraternity(candidate) {
}
```
-**Note**
-Since the `constructor` property can be overwritten (which will be covered in the next two challenges) it’s generally better to use the `instanceof` method to check the type of an object.
+**Nota:** dado que la propiedad `constructor` se puede sobreescribir (se verá en los próximos dos desafíos), por lo general, es mejor utilizar el método `instanceof` para verificar el tipo de un objeto.
# --instructions--
-Write a `joinDogFraternity` function that takes a `candidate` parameter and, using the `constructor` property, return `true` if the candidate is a `Dog`, otherwise return `false`.
+Escribe una función `joinDogFraternity` que tome como parámetro `candidate` y que con la propiedad `constructor`, devuelva `true` si el candidato es un `Dog` y si no lo es debería devolver `false`.
# --hints--
-`joinDogFraternity` should be defined as a function.
+`joinDogFraternity` debe definirse como una función.
```js
assert(typeof joinDogFraternity === 'function');
```
-`joinDogFraternity` should return true if`candidate` is an instance of `Dog`.
+`joinDogFraternity` debe devolver `true` si `candidate` es una instancia de `Dog`.
```js
assert(joinDogFraternity(new Dog('')) === true);
```
-`joinDogFraternity` should use the `constructor` property.
+`joinDogFraternity` debe utilizar la propiedad `constructor`.
```js
assert(/\.constructor/.test(code) && !/instanceof/.test(code));
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-immediately-invoked-function-expression-iife.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-immediately-invoked-function-expression-iife.md
index cc33fc1883..4ba3f4a1e5 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-immediately-invoked-function-expression-iife.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-immediately-invoked-function-expression-iife.md
@@ -1,6 +1,6 @@
---
id: 587d7db2367417b2b2512b8b
-title: Understand the Immediately Invoked Function Expression (IIFE)
+title: Comprende las funciones que son invocadas inmediatamente (IIFE)
challengeType: 1
forumTopicId: 301328
dashedName: understand-the-immediately-invoked-function-expression-iife
@@ -8,30 +8,31 @@ dashedName: understand-the-immediately-invoked-function-expression-iife
# --description--
-A common pattern in JavaScript is to execute a function as soon as it is declared:
+Un patrón común en JavaScript es la ejecución de una función apenas declarada:
```js
(function () {
console.log("Chirp, chirp!");
-})(); // this is an anonymous function expression that executes right away
-// Outputs "Chirp, chirp!" immediately
+})();
```
-Note that the function has no name and is not stored in a variable. The two parentheses () at the end of the function expression cause it to be immediately executed or invoked. This pattern is known as an immediately invoked function expression or IIFE.
+Esta es una expresión de función anónima que se ejecuta de inmediato y produce `Chirp, chirp!` inmediatamente.
+
+Ten en cuenta que la función no tiene nombre y que no se almacena en un valor. Los dos paréntesis () al final de la expresión de la función hacen que se ejecute o invoque de forma inmediata. Este patrón se conoce como una expresión de función inmediatamente invocada o IIFE (por sus siglas en inglés).
# --instructions--
-Rewrite the function `makeNest` and remove its call so instead it's an anonymous immediately invoked function expression (IIFE).
+Reescribe la función `makeNest` y elimina su llamada, por lo que es una expresión de función anónima inmediatamente invocada (IIFE).
# --hints--
-The function should be anonymous.
+La función debe ser anónima.
```js
assert(/\((function|\(\))(=>|\(\)){?/.test(code.replace(/\s/g, '')));
```
-Your function should have parentheses at the end of the expression to call it immediately.
+Tu función debe tener paréntesis al final de la expresión para llamarle de inmediato.
```js
assert(/\(.*(\)\(|\}\(\))\)/.test(code.replace(/[\s;]/g, '')));
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-prototype-chain.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-prototype-chain.md
index 7632ddb4b3..4056fd88a5 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-prototype-chain.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-prototype-chain.md
@@ -1,6 +1,6 @@
---
id: 587d7db0367417b2b2512b82
-title: Understand the Prototype Chain
+title: Comprende la cadena "prototype"
challengeType: 1
forumTopicId: 301329
dashedName: understand-the-prototype-chain
@@ -8,38 +8,38 @@ dashedName: understand-the-prototype-chain
# --description--
-All objects in JavaScript (with a few exceptions) have a `prototype`. Also, an object’s `prototype` itself is an object.
+Todos los objetos en JavaScript (con algunas excepciones) tienen un `prototype`. Además, el `prototype` de un objeto en sí mismo es un objeto.
```js
function Bird(name) {
this.name = name;
}
-typeof Bird.prototype; // yields 'object'
+typeof Bird.prototype;
```
-Because a `prototype` is an object, a `prototype` can have its own `prototype`! In this case, the `prototype` of `Bird.prototype` is `Object.prototype`:
+Debido a que `prototype` es un objeto, ¡un`prototype` puede tener su propio `prototype`! En este caso, el `prototype` de `Bird.prototype` es `Object.prototype`:
```js
-Object.prototype.isPrototypeOf(Bird.prototype); // returns true
+Object.prototype.isPrototypeOf(Bird.prototype);
```
-How is this useful? You may recall the `hasOwnProperty` method from a previous challenge:
+¿Por qué sería útil? Quizás recuerdes el método `hasOwnProperty` del desafío pasado:
```js
let duck = new Bird("Donald");
-duck.hasOwnProperty("name"); // yields true
+duck.hasOwnProperty("name");
```
-The `hasOwnProperty` method is defined in `Object.prototype`, which can be accessed by `Bird.prototype`, which can then be accessed by `duck`. This is an example of the `prototype` chain. In this `prototype` chain, `Bird` is the `supertype` for `duck`, while `duck` is the `subtype`. `Object` is a `supertype` for both `Bird` and `duck`. `Object` is a `supertype` for all objects in JavaScript. Therefore, any object can use the `hasOwnProperty` method.
+El método `hasOwnProperty` se define en `Object.prototype` al cual se puede acceder con `Bird.prototype`, al que se puede acceder con `duck`. Este es un ejemplo de la cadena `prototype`. En esta cadena `prototype`, `Bird` es el `supertype` de `duck` mientras que `duck` es el `subtype`. `Object` es un `supertype` de `Bird` y `duck`. `Object` es un `supertype` de todos los objetos en JavaScript. Por lo tanto, cualquier objeto puede utilizar el método `hasOwnProperty`.
# --instructions--
-Modify the code to show the correct prototype chain.
+Modifica el código para mostrar la cadena de prototipos correcta.
# --hints--
-Your code should show that `Object.prototype` is the prototype of `Dog.prototype`
+El código debe mostrar que `Object.prototype` es el prototipo de `Dog.prototype`
```js
assert(/Object\.prototype\.isPrototypeOf/.test(code));
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-where-an-objects-prototype-comes-from.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-where-an-objects-prototype-comes-from.md
index 5644bfa873..005391cf26 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-where-an-objects-prototype-comes-from.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-where-an-objects-prototype-comes-from.md
@@ -1,6 +1,6 @@
---
id: 587d7db0367417b2b2512b81
-title: Understand Where an Object’s Prototype Comes From
+title: Entendiendo de dónde viene el prototipo de un objeto
challengeType: 1
forumTopicId: 301330
dashedName: understand-where-an-objects-prototype-comes-from
@@ -8,7 +8,7 @@ dashedName: understand-where-an-objects-prototype-comes-from
# --description--
-Just like people inherit genes from their parents, an object inherits its `prototype` directly from the constructor function that created it. For example, here the `Bird` constructor creates the `duck` object:
+Así como las personas heredamos genes de nuestros padres, los objetos también heredan su `prototype` directamente de la función constructor que lo creó. Por ejemplo, aquí el constructor `Bird` crea el objeto `duck`:
```js
function Bird(name) {
@@ -18,20 +18,21 @@ function Bird(name) {
let duck = new Bird("Donald");
```
-`duck` inherits its `prototype` from the `Bird` constructor function. You can show this relationship with the `isPrototypeOf` method:
+`duck` hereda su `prototype` de la función constructor `Bird`. Puedes mostrar esta relación con el método `isPrototypeOf`:
```js
Bird.prototype.isPrototypeOf(duck);
-// returns true
```
+Este devolvería `true`.
+
# --instructions--
-Use `isPrototypeOf` to check the `prototype` of `beagle`.
+Utiliza `isPrototypeOf` para comprobar el `prototype` de `beagle`.
# --hints--
-You should show that `Dog.prototype` is the `prototype` of `beagle`
+Debes mostrar que `Dog.prototype` es el `prototype` de `beagle`
```js
assert(/Dog\.prototype\.isPrototypeOf\(beagle\)/.test(code));
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-constructor-to-create-objects.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-constructor-to-create-objects.md
index d26baffb1a..2229cb68ea 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-constructor-to-create-objects.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-constructor-to-create-objects.md
@@ -1,6 +1,6 @@
---
id: 587d7dad367417b2b2512b78
-title: Use a Constructor to Create Objects
+title: Utiliza un constructor para crear objetos
challengeType: 1
forumTopicId: 18233
dashedName: use-a-constructor-to-create-objects
@@ -8,47 +8,48 @@ dashedName: use-a-constructor-to-create-objects
# --description--
-Here's the `Bird` constructor from the previous challenge:
+Aquí tenemos el constructor `Bird` del desafío anterior:
```js
function Bird() {
this.name = "Albert";
this.color = "blue";
this.numLegs = 2;
- // "this" inside the constructor always refers to the object being created
}
let blueBird = new Bird();
```
-Notice that the `new` operator is used when calling a constructor. This tells JavaScript to create a new instance of `Bird` called `blueBird`. Without the `new` operator, `this` inside the constructor would not point to the newly created object, giving unexpected results. Now `blueBird` has all the properties defined inside the `Bird` constructor:
+**NOTA:** `this` dentro del constructor siempre se refiere al objeto que se está creando.
+
+Observa que se utiliza el operador `new` cuando llamamos a un constructor. Esto le indica a JavaScript que cree una nueva instancia de `Bird` llamada `blueBird`. Sin el operador `new`, dentro del constructor `this` no haría referencia al nuevo objeto, dando resultados inesperados. Ahora `blueBird` tiene todas las propiedades definidas dentro del constructor `Bird`:
```js
-blueBird.name; // => Albert
-blueBird.color; // => blue
-blueBird.numLegs; // => 2
+blueBird.name;
+blueBird.color;
+blueBird.numLegs;
```
-Just like any other object, its properties can be accessed and modified:
+Al igual que cualquier otro objeto, sus propiedades pueden ser accedidas y modificadas:
```js
blueBird.name = 'Elvira';
-blueBird.name; // => Elvira
+blueBird.name;
```
# --instructions--
-Use the `Dog` constructor from the last lesson to create a new instance of `Dog`, assigning it to a variable `hound`.
+Utiliza el constructor `Dog` de la última lección para crear una nueva instancia de `Dog`, asignándolo a una variable `hound`.
# --hints--
-`hound` should be created using the `Dog` constructor.
+`hound` debe ser creado usando el constructor `Dog`.
```js
assert(hound instanceof Dog);
```
-Your code should use the `new` operator to create an instance of `Dog`.
+Tu código debe usar el operador `new` para crear una instancia de `Dog`.
```js
assert(code.match(/new/g));
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-mixin-to-add-common-behavior-between-unrelated-objects.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-mixin-to-add-common-behavior-between-unrelated-objects.md
index 5664c1e414..449b1a2bab 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-mixin-to-add-common-behavior-between-unrelated-objects.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-mixin-to-add-common-behavior-between-unrelated-objects.md
@@ -1,6 +1,6 @@
---
id: 587d7db2367417b2b2512b89
-title: Use a Mixin to Add Common Behavior Between Unrelated Objects
+title: Utiliza un "mixin" para añadir un comportamiento común entre objetos no relacionados
challengeType: 1
forumTopicId: 301331
dashedName: use-a-mixin-to-add-common-behavior-between-unrelated-objects
@@ -8,9 +8,9 @@ dashedName: use-a-mixin-to-add-common-behavior-between-unrelated-objects
# --description--
-As you have seen, behavior is shared through inheritance. However, there are cases when inheritance is not the best solution. Inheritance does not work well for unrelated objects like `Bird` and `Airplane`. They can both fly, but a `Bird` is not a type of `Airplane` and vice versa.
+Como ya has visto, el comportamiento se comparte mediante una herencia. Sin embargo, hay algunos casos en los que la herencia no es la mejor opción. La herencia no funciona bien con objetos que no están relacionados como `Bird` y `Airplane`. Ambos pueden volar pero un `Bird` no es un tipo de `Airplane` y viceversa.
-For unrelated objects, it's better to use mixins. A mixin allows other objects to use a collection of functions.
+Para objetos no relacionados es mejor utilizar mixins. Un "mixin" permite a otros objetos utilizar una colección de funciones.
```js
let flyMixin = function(obj) {
@@ -20,7 +20,7 @@ let flyMixin = function(obj) {
};
```
-The `flyMixin` takes any object and gives it the `fly` method.
+El `flyMixin` toma a cualquier objeto y le da el método `fly`.
```js
let bird = {
@@ -37,34 +37,36 @@ flyMixin(bird);
flyMixin(plane);
```
-Here `bird` and `plane` are passed into `flyMixin`, which then assigns the `fly` function to each object. Now `bird` and `plane` can both fly:
+Aquí `bird` y `plane` son pasados a `flyMixin` el cual después asigna la función `fly` a cada objeto. Ahora `bird` y `plane` pueden volar:
```js
-bird.fly(); // prints "Flying, wooosh!"
-plane.fly(); // prints "Flying, wooosh!"
+bird.fly();
+plane.fly();
```
-Note how the mixin allows for the same `fly` method to be reused by unrelated objects `bird` and `plane`.
+La consola mostraría la cadena `Flying, wooosh!` dos veces, una por cada llamada a `.fly()`.
+
+Ten en cuenta cómo el mixin permite que el mismo método `fly` sea reutilizado por los objetos `bird` y `plane` los cuales no están relacionados.
# --instructions--
-Create a mixin named `glideMixin` that defines a method named `glide`. Then use the `glideMixin` to give both `bird` and `boat` the ability to glide.
+Crea un mixin llamado `glideMixin` que defina un método llamado `glide`. Luego utiliza el `glideMixin` para dar a `bird` y `boat` la habilidad de planear.
# --hints--
-Your code should declare a `glideMixin` variable that is a function.
+El código debe declarar una variable `glideMixin` que sea una función.
```js
assert(typeof glideMixin === 'function');
```
-Your code should use the `glideMixin` on the `bird` object to give it the `glide` method.
+El código debe usar el `glideMixin` en el objeto `bird` para darle el método `glide` (planear).
```js
assert(typeof bird.glide === 'function');
```
-Your code should use the `glideMixin` on the `boat` object to give it the `glide` method.
+El código debe usar el `glideMixin` en el objeto `boat` para darle el método `glide` (planear).
```js
assert(typeof boat.glide === 'function');
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-an-iife-to-create-a-module.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-an-iife-to-create-a-module.md
index 6f5a69f157..7bb4dc4151 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-an-iife-to-create-a-module.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-an-iife-to-create-a-module.md
@@ -1,6 +1,6 @@
---
id: 587d7db2367417b2b2512b8c
-title: Use an IIFE to Create a Module
+title: Utiliza una IIFE para crear un módulo
challengeType: 1
forumTopicId: 301332
dashedName: use-an-iife-to-create-a-module
@@ -8,7 +8,7 @@ dashedName: use-an-iife-to-create-a-module
# --description--
-An immediately invoked function expression (IIFE) is often used to group related functionality into a single object or module. For example, an earlier challenge defined two mixins:
+Una expresión de función inmediatamente invocada (IIFE) se utiliza a menudo para agrupar la funcionalidad relacionada en un solo objeto o módulo. Por ejemplo, en el desafío anterior se definieron dos "mixins":
```js
function glideMixin(obj) {
@@ -23,7 +23,7 @@ function flyMixin(obj) {
}
```
-We can group these mixins into a module as follows:
+Podemos agrupar estos mixins en un módulo:
```js
let motionModule = (function () {
@@ -39,10 +39,10 @@ let motionModule = (function () {
};
}
}
-})(); // The two parentheses cause the function to be immediately invoked
+})();
```
-Note that you have an immediately invoked function expression (IIFE) that returns an object `motionModule`. This returned object contains all of the mixin behaviors as properties of the object. The advantage of the module pattern is that all of the motion behaviors can be packaged into a single object that can then be used by other parts of your code. Here is an example using it:
+Ten en cuenta que has invocado una IIFE que devuelve un objeto `motionModule`. El objeto devuelto contiene todos los comportamientos de los mixins como propiedades del objeto. La ventaja del patrón del módulo es que todos los comportamientos de movimiento pueden ser empaquetados en un solo objeto que puede ser usado por otras partes del código. Así se debe utilizar:
```js
motionModule.glideMixin(duck);
@@ -51,23 +51,23 @@ duck.glide();
# --instructions--
-Create a module named `funModule` to wrap the two mixins `isCuteMixin` and `singMixin`. `funModule` should return an object.
+Crea un módulo llamado `funModule` para envolver los dos mixins `isCuteMixin` y `singMixin`. `funModule` debe devolver un objeto.
# --hints--
-`funModule` should be defined and return an object.
+`funModule` debe ser definido y devolver un objeto.
```js
assert(typeof funModule === 'object');
```
-`funModule.isCuteMixin` should access a function.
+`funModule.isCuteMixin` debe acceder a una función.
```js
assert(typeof funModule.isCuteMixin === 'function');
```
-`funModule.singMixin` should access a function.
+`funModule.singMixin` debe acceder a una función.
```js
assert(typeof funModule.singMixin === 'function');
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object.md
index b4e34f42f9..40c90984f9 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object.md
@@ -1,6 +1,6 @@
---
id: 587d7dac367417b2b2512b74
-title: Use Dot Notation to Access the Properties of an Object
+title: Utiliza notación de puntos para acceder a las propiedades de un objeto
challengeType: 1
forumTopicId: 301333
dashedName: use-dot-notation-to-access-the-properties-of-an-object
@@ -8,7 +8,7 @@ dashedName: use-dot-notation-to-access-the-properties-of-an-object
# --description--
-The last challenge created an object with various properties. Now you'll see how to access the values of those properties. Here's an example:
+En el último desafío creaste un objeto con varias propiedades. Ahora verás cómo acceder a los valores de esas propiedades. Por ejemplo:
```js
let duck = {
@@ -16,24 +16,23 @@ let duck = {
numLegs: 2
};
console.log(duck.name);
-// This prints "Aflac" to the console
```
-Dot notation is used on the object name, `duck`, followed by the name of the property, `name`, to access the value of "Aflac".
+Se utiliza notación de puntos con el nombre del objeto, `duck`, seguido por el nombre de la propiedad, `name`, para acceder al valor de `Aflac`.
# --instructions--
-Print both properties of the `dog` object to your console.
+Imprime ambas propiedades del objeto `dog` en tu consola.
# --hints--
-Your code should use `console.log` to print the value for the `name` property of the `dog` object.
+Tu código debe usar `console.log` para imprimir el valor de la propiedad `name` del objeto `dog`.
```js
assert(/console.log\(.*dog\.name.*\)/g.test(code));
```
-Your code should use `console.log` to print the value for the `numLegs` property of the `dog` object.
+Tu código debe usar `console.log` para imprimir el valor de la propiedad `numLegs` del objeto `dog`.
```js
assert(/console.log\(.*dog\.numLegs.*\)/g.test(code));
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/verify-an-objects-constructor-with-instanceof.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/verify-an-objects-constructor-with-instanceof.md
index 5c4258a1b4..28c359022a 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/verify-an-objects-constructor-with-instanceof.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/verify-an-objects-constructor-with-instanceof.md
@@ -1,6 +1,6 @@
---
id: 587d7dae367417b2b2512b7a
-title: Verify an Object's Constructor with instanceof
+title: Verifica el constructor de un objeto con "instanceof"
challengeType: 1
forumTopicId: 301337
dashedName: verify-an-objects-constructor-with-instanceof
@@ -8,7 +8,7 @@ dashedName: verify-an-objects-constructor-with-instanceof
# --description--
-Anytime a constructor function creates a new object, that object is said to be an instance of its constructor. JavaScript gives a convenient way to verify this with the `instanceof` operator. `instanceof` allows you to compare an object to a constructor, returning `true` or `false` based on whether or not that object was created with the constructor. Here's an example:
+Cada vez que una función constructora crea un nuevo objeto, se dice que ese objeto es una instancia de su constructor. JavaScript proporciona una manera conveniente de verificar esto con el operador `instanceof`. `instanceof` permite comparar un objeto con un constructor, devuelve `true` o `false` basado en si ese objeto fue creado o no con dicho constructor. Aquí hay un ejemplo:
```js
let Bird = function(name, color) {
@@ -19,10 +19,12 @@ let Bird = function(name, color) {
let crow = new Bird("Alexis", "black");
-crow instanceof Bird; // => true
+crow instanceof Bird;
```
-If an object is created without using a constructor, `instanceof` will verify that it is not an instance of that constructor:
+Aquí el método `instanceof` devolverá `true`.
+
+Si un objeto es creado sin usar un constructor, `instanceof` verificará que no es una instancia de ese constructor:
```js
let canary = {
@@ -31,22 +33,24 @@ let canary = {
numLegs: 2
};
-canary instanceof Bird; // => false
+canary instanceof Bird;
```
+Aquí el método `instanceof` devolverá `false`.
+
# --instructions--
-Create a new instance of the `House` constructor, calling it `myHouse` and passing a number of bedrooms. Then, use `instanceof` to verify that it is an instance of `House`.
+Crea una nueva instancia del constructor `House`, llamándola `myHouse` y pasando el número de habitaciones. Luego, usa `instanceof` para verificar que es una instancia de `House`.
# --hints--
-`myHouse` should have a `numBedrooms` attribute set to a number.
+`myHouse` debe tener un atributo `numBedrooms` establecido a un número.
```js
assert(typeof myHouse.numBedrooms === 'number');
```
-You should verify that `myHouse` is an instance of `House` using the `instanceof` operator.
+Debes verificar que `myHouse` es una instancia de `House` usando el operador `instanceof`.
```js
assert(/myHouse\s*instanceof\s*House/.test(code));
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/match-literal-strings.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/match-literal-strings.md
index 132c48dbe4..0985c07a3d 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/match-literal-strings.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/match-literal-strings.md
@@ -1,6 +1,6 @@
---
id: 587d7db3367417b2b2512b8f
-title: Match Literal Strings
+title: Haz coincidir cadenas literales
challengeType: 1
forumTopicId: 301355
dashedName: match-literal-strings
@@ -8,44 +8,46 @@ dashedName: match-literal-strings
# --description--
-In the last challenge, you searched for the word `"Hello"` using the regular expression `/Hello/`. That regex searched for a literal match of the string `"Hello"`. Here's another example searching for a literal match of the string `"Kevin"`:
+En el desafío anterior, buscaste la palabra `Hello` usando la expresión regular `/Hello/`. Esa expresión regular buscó una coincidencia literal de la cadena `Hello`. Aquí hay otro ejemplo donde se busca una coincidencia literal de la cadena `Kevin`:
```js
let testStr = "Hello, my name is Kevin.";
let testRegex = /Kevin/;
testRegex.test(testStr);
-// Returns true
```
-Any other forms of `"Kevin"` will not match. For example, the regex `/Kevin/` will not match `"kevin"` or `"KEVIN"`.
+Esta llamada a `test` devolverá `true`.
+
+Cualquier otra variante de `Kevin` no coincidirá. Por ejemplo, la expresión regular `/Kevin/` no coincidirá con `kevin` o `KEVIN`.
```js
let wrongRegex = /kevin/;
wrongRegex.test(testStr);
-// Returns false
```
-A future challenge will show how to match those other forms as well.
+Esta llamada a `test` devolverá `false`.
+
+Un futuro desafío también mostrará cómo coincidir esas otras variantes.
# --instructions--
-Complete the regex `waldoRegex` to find `"Waldo"` in the string `waldoIsHiding` with a literal match.
+Completa la expresión regular `waldoRegex` para encontrar `"Waldo"` en la cadena `waldoIsHiding` con una coincidencia literal.
# --hints--
-Your regex `waldoRegex` should find `"Waldo"`
+Tu expresión regular `waldoRegex` debe encontrar la cadena `Waldo`
```js
assert(waldoRegex.test(waldoIsHiding));
```
-Your regex `waldoRegex` should not search for anything else.
+Tu expresión regular `waldoRegex` no debe buscar ninguna otra cosa.
```js
assert(!waldoRegex.test('Somewhere is hiding in this text.'));
```
-You should perform a literal string match with your regex.
+Debes realizar una coincidencia de cadena literal con tu expresión regular.
```js
assert(!/\/.*\/i/.test(code));
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/match-non-whitespace-characters.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/match-non-whitespace-characters.md
index 9607d58cc9..78633d01e5 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/match-non-whitespace-characters.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/match-non-whitespace-characters.md
@@ -1,6 +1,6 @@
---
id: 587d7db9367417b2b2512ba4
-title: Match Non-Whitespace Characters
+title: Haz coincidir caracteres que no sean espacios en blanco
challengeType: 1
forumTopicId: 18210
dashedName: match-non-whitespace-characters
@@ -8,35 +8,37 @@ dashedName: match-non-whitespace-characters
# --description--
-You learned about searching for whitespace using `\s`, with a lowercase `s`. You can also search for everything except whitespace.
+Aprendiste a buscar espacios en blanco usando `\s`, con una `s` en minúscula. También puedes buscar todo excepto los espacios en blanco.
-Search for non-whitespace using `\S`, which is an uppercase `s`. This pattern will not match whitespace, carriage return, tab, form feed, and new line characters. You can think of it being similar to the character class `[^ \r\t\f\n\v]`.
+Busca caracteres que no sean espacios en blanco usando `\S`, la cual es una `s` mayúscula. Este patrón no coincidirá con los caracteres de espacios en blanco, retorno de carro, tabulaciones, alimentación de formulario y saltos de línea. Puedes pensar que es similar a la clase de caracteres `[^ \r\t\f\n\v]`.
```js
let whiteSpace = "Whitespace. Whitespace everywhere!"
let nonSpaceRegex = /\S/g;
-whiteSpace.match(nonSpaceRegex).length; // Returns 32
+whiteSpace.match(nonSpaceRegex).length;
```
+El valor devuelto por el método `.length` sería `32`.
+
# --instructions--
-Change the regex `countNonWhiteSpace` to look for multiple non-whitespace characters in a string.
+Cambia la expresión regular `countNonWhiteSpace` para buscar varios caracteres que no sean espacios en blanco en una cadena.
# --hints--
-Your regex should use the global flag.
+Tu expresión regular debe usar la bandera global.
```js
assert(countNonWhiteSpace.global);
```
-Your regex should use the shorthand character `\S` to match all non-whitespace characters.
+Tu expresión regular debe usar el carácter abreviado `\S` para que coincida con todos los caracteres que no sean espacios en blanco.
```js
assert(/\\S/.test(countNonWhiteSpace.source));
```
-Your regex should find 35 non-spaces in `"Men are from Mars and women are from Venus."`
+Tu expresión regular debe encontrar 35 caracteres que no sean espacios en la cadena `Men are from Mars and women are from Venus.`
```js
assert(
@@ -45,13 +47,13 @@ assert(
);
```
-Your regex should find 23 non-spaces in `"Space: the final frontier."`
+Tu expresión regular debe encontrar 23 caracteres que no sean espacios en la cadena `Space: the final frontier.`
```js
assert('Space: the final frontier.'.match(countNonWhiteSpace).length == 23);
```
-Your regex should find 21 non-spaces in `"MindYourPersonalSpace"`
+Tu expresión regular debe encontrar 21 caracteres que no sean espacios en la cadena `MindYourPersonalSpace`
```js
assert('MindYourPersonalSpace'.match(countNonWhiteSpace).length == 21);
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/match-numbers-and-letters-of-the-alphabet.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/match-numbers-and-letters-of-the-alphabet.md
index 1702acbad8..05e30948ff 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/match-numbers-and-letters-of-the-alphabet.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/match-numbers-and-letters-of-the-alphabet.md
@@ -1,6 +1,6 @@
---
id: 587d7db5367417b2b2512b97
-title: Match Numbers and Letters of the Alphabet
+title: Haz coincidir los números y las letras del alfabeto
challengeType: 1
forumTopicId: 301356
dashedName: match-numbers-and-letters-of-the-alphabet
@@ -8,38 +8,37 @@ dashedName: match-numbers-and-letters-of-the-alphabet
# --description--
-Using the hyphen (`-`) to match a range of characters is not limited to letters. It also works to match a range of numbers.
+Usar el guión (`-`) para coincidir con un rango de caracteres no está limitado a letras. También funciona para hacer coincidir un rango de números.
-For example, `/[0-5]/` matches any number between `0` and `5`, including the `0` and `5`.
+Por ejemplo, `/[0-5]/` coincide con cualquier número entre `0` y `5`, incluyendo `0` y `5`.
-Also, it is possible to combine a range of letters and numbers in a single character set.
+Además, es posible combinar un rango de letras y números en un único conjunto de caracteres.
```js
let jennyStr = "Jenny8675309";
let myRegex = /[a-z0-9]/ig;
-// matches all letters and numbers in jennyStr
jennyStr.match(myRegex);
```
# --instructions--
-Create a single regex that matches a range of letters between `h` and `s`, and a range of numbers between `2` and `6`. Remember to include the appropriate flags in the regex.
+Crea una sola expresión regular que coincida con un rango de letras entre `h` y `s`, y un rango de números entre `2` y `6`. Recuerda incluir las banderas apropiadas en la expresión regular.
# --hints--
-Your regex `myRegex` should match 17 items.
+Tu expresión regular `myRegex` debe coincidir con 17 elementos.
```js
assert(result.length == 17);
```
-Your regex `myRegex` should use the global flag.
+Tu expresión regular `myRegex` debe utilizar la bandera global.
```js
assert(myRegex.flags.match(/g/).length == 1);
```
-Your regex `myRegex` should use the case insensitive flag.
+Tu expresión regular `myRegex` debe utilizar la bandera que no distingue entre mayúsculas y minúsculas.
```js
assert(myRegex.flags.match(/i/).length == 1);
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/positive-and-negative-lookahead.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/positive-and-negative-lookahead.md
index e7b4814726..3aaa73c736 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/positive-and-negative-lookahead.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/positive-and-negative-lookahead.md
@@ -1,6 +1,6 @@
---
id: 587d7dba367417b2b2512ba9
-title: Positive and Negative Lookahead
+title: Lookahead positivo y negativo
challengeType: 1
forumTopicId: 301360
dashedName: positive-and-negative-lookahead
@@ -8,88 +8,90 @@ dashedName: positive-and-negative-lookahead
# --description--
-Lookaheads are patterns that tell JavaScript to look-ahead in your string to check for patterns further along. This can be useful when you want to search for multiple patterns over the same string.
+Los lookaheads son patrones que le indican a JavaScript que busque por anticipado en tu cadena para verificar patrones más adelante. Esto puede ser útil cuando deseas buscar varios patrones sobre la misma cadena.
-There are two kinds of lookaheads: positive lookahead and negative lookahead.
+Hay dos tipos de lookaheads: lookahead positivo y lookahead negativo.
-A positive lookahead will look to make sure the element in the search pattern is there, but won't actually match it. A positive lookahead is used as `(?=...)` where the `...` is the required part that is not matched.
+Un lookahead positivo buscará para asegurarse de que el elemento en el patrón de búsqueda este allí, pero en realidad no lo coincidirá. Un lookahead positivo se usa como `(?=...)` donde el `...` es la parte requerida que no coincide.
-On the other hand, a negative lookahead will look to make sure the element in the search pattern is not there. A negative lookahead is used as `(?!...)` where the `...` is the pattern that you do not want to be there. The rest of the pattern is returned if the negative lookahead part is not present.
+Por otro lado, un lookahead negativo buscará para asegurarse de que el elemento en el patrón de búsqueda no este allí. Un lookahead negativo se usa como `(?!...)` donde el `...` es el patrón que no quieres que esté allí. El resto del patrón se devuelve si la parte de lookahead negativo no está presente.
-Lookaheads are a bit confusing but some examples will help.
+Los lookaheads son un poco confusos, pero algunos ejemplos ayudarán.
```js
let quit = "qu";
let noquit = "qt";
let quRegex= /q(?=u)/;
let qRegex = /q(?!u)/;
-quit.match(quRegex); // Returns ["q"]
-noquit.match(qRegex); // Returns ["q"]
+quit.match(quRegex);
+noquit.match(qRegex);
```
-A more practical use of lookaheads is to check two or more patterns in one string. Here is a (naively) simple password checker that looks for between 3 and 6 characters and at least one number:
+Ambas llamadas a `match` devolverán `["q"]`.
+
+Un uso más práctico de lookaheads es comprobar dos o más patrones en una cadena. Aquí hay un verificador de contraseñas (ingenuamente) simple que busca entre 3 y 6 caracteres y al menos un número:
```js
let password = "abc123";
let checkPass = /(?=\w{3,6})(?=\D*\d)/;
-checkPass.test(password); // Returns true
+checkPass.test(password);
```
# --instructions--
-Use lookaheads in the `pwRegex` to match passwords that are greater than 5 characters long, and have two consecutive digits.
+Utiliza los lookaheads en el `pwRegex` para que coincida con las contraseñas que tengan más de 5 caracteres y dos dígitos consecutivos.
# --hints--
-Your regex should use two positive `lookaheads`.
+Tu expresión regular debe usar dos `lookaheads` positivos.
```js
assert(pwRegex.source.match(/\(\?=.*?\)\(\?=.*?\)/) !== null);
```
-Your regex should not match `"astronaut"`
+Tu expresión regular no debe coincidir con la cadena `astronaut`
```js
assert(!pwRegex.test('astronaut'));
```
-Your regex should not match `"banan1"`
+Tu expresión regular no debe coincidir con la cadena `banan1`
```js
assert(!pwRegex.test('banan1'));
```
-Your regex should match `"bana12"`
+Tu expresión regular debe coincidir con la cadena `bana12`
```js
assert(pwRegex.test('bana12'));
```
-Your regex should match `"abc123"`
+Tu expresión regular debe coincidir con la cadena `abc123`
```js
assert(pwRegex.test('abc123'));
```
-Your regex should not match `"12345"`
+Tu expresión regular no debe coincidir con la cadena `12345`
```js
assert(!pwRegex.test('12345'));
```
-Your regex should match `"8pass99"`
+Tu expresión regular debe coincidir con la cadena `8pass99`
```js
assert(pwRegex.test('8pass99'));
```
-Your regex should not match `"1a2bcde"`
+Tu expresión regular no debe coincidir con la cadena `1a2bcde`
```js
assert(!pwRegex.test('1a2bcde'));
```
-Your regex should match `"astr1on11aut"`
+Tu expresión regular debe coincidir con la cadena `astr1on11aut`
```js
assert(pwRegex.test('astr1on11aut'));
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/restrict-possible-usernames.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/restrict-possible-usernames.md
index 59da9fb360..791328c1ed 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/restrict-possible-usernames.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/restrict-possible-usernames.md
@@ -1,6 +1,6 @@
---
id: 587d7db8367417b2b2512ba2
-title: Restrict Possible Usernames
+title: Restringe posibles nombres de usuario
challengeType: 1
forumTopicId: 301363
dashedName: restrict-possible-usernames
@@ -8,96 +8,102 @@ dashedName: restrict-possible-usernames
# --description--
-Usernames are used everywhere on the internet. They are what give users a unique identity on their favorite sites.
+Los nombres de usuario se utilizan en todas partes en Internet. Son los que dan a los usuarios una identidad única en tus sitios favoritos.
-You need to check all the usernames in a database. Here are some simple rules that users have to follow when creating their username.
+Se necesita comprobar todos los nombres de usuario en una base de datos. Estas son algunas reglas simples que los usuarios deben seguir al crear su nombre de usuario.
-1) Usernames can only use alpha-numeric characters.
+1) Los nombres de usuario sólo pueden utilizar caracteres alfanuméricos.
-2) The only numbers in the username have to be at the end. There can be zero or more of them at the end. Username cannot start with the number.
+2) Los únicos números del nombre de usuario tienen que estar al final. Puede tener un cero o más al final. El nombre de usuario no puede iniciar con un número.
-3) Username letters can be lowercase and uppercase.
+3) Las letras del nombre de usuario pueden ser minúsculas y mayúsculas.
-4) Usernames have to be at least two characters long. A two-character username can only use alphabet letters as characters.
+4) Los nombres de usuario deben tener al menos dos caracteres. Un nombre de usuario de dos caracteres sólo puede utilizar letras del alfabeto como caracteres.
# --instructions--
-Change the regex `userCheck` to fit the constraints listed above.
+Cambia la expresión regular `userCheck` para que se ajuste a las restricciones indicadas anteriormente.
# --hints--
-Your regex should match `JACK`
+Tu expresión regular debe coincidir con la cadena `JACK`
```js
assert(userCheck.test('JACK'));
```
-Your regex should not match `J`
+Tu expresión regular no debe coincidir con la cadena `J`
```js
assert(!userCheck.test('J'));
```
-Your regex should match `Jo`
+Tu expresión regular debe coincidir con la cadena `Jo`
```js
assert(userCheck.test('Jo'));
```
-Your regex should match `Oceans11`
+Tu expresión regular debe coincidir con la cadena `Oceans11`
```js
assert(userCheck.test('Oceans11'));
```
-Your regex should match `RegexGuru`
+Tu expresión regular debe coincidir con la cadena `RegexGuru`
```js
assert(userCheck.test('RegexGuru'));
```
-Your regex should not match `007`
+Tu expresión regular no debe coincidir con la cadena `007`
```js
assert(!userCheck.test('007'));
```
-Your regex should not match `9`
+Tu expresión regular no debe coincidir con la cadena `9`
```js
assert(!userCheck.test('9'));
```
-Your regex should not match `A1`
+Tu expresión regular no debe coincidir con la cadena `A1`
```js
assert(!userCheck.test('A1'));
```
-Your regex should not match `BadUs3rnam3`
+Tu expresión regular no debe coincidir con la cadena `BadUs3rnam3`
```js
assert(!userCheck.test('BadUs3rnam3'));
```
-Your regex should match `Z97`
+Tu expresión regular debe coincidir con la cadena `Z97`
```js
assert(userCheck.test('Z97'));
```
-Your regex should not match `c57bT3`
+Tu expresión regular no debe coincidir con la cadena `c57bT3`
```js
assert(!userCheck.test('c57bT3'));
```
-Your regex should match `AB1`
+Tu expresión regular debe coincidir con la cadena `AB1`
```js
assert(userCheck.test('AB1'));
```
+Tu expresión regular no debe coincidir con la cadena `J%4`
+
+```js
+assert(!userCheck.test('J%4'))
+```
+
# --seed--
## --seed-contents--
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups.md
index d6267d3468..7d03de4b79 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups.md
@@ -1,6 +1,6 @@
---
id: 587d7dbb367417b2b2512baa
-title: Reuse Patterns Using Capture Groups
+title: Reutiliza patrones usando grupos de captura
challengeType: 1
forumTopicId: 301364
dashedName: reuse-patterns-using-capture-groups
@@ -8,78 +8,80 @@ dashedName: reuse-patterns-using-capture-groups
# --description--
-Some patterns you search for will occur multiple times in a string. It is wasteful to manually repeat that regex. There is a better way to specify when you have multiple repeat substrings in your string.
+Algunos patrones que busques aparecerán múltiples veces en una cadena. Es un desperdicio repetir manualmente esa expresión regular. Existe una mejor forma de especificar que tienes múltiples subcadenas repetidas en tu cadena.
-You can search for repeat substrings using capture groups. Parentheses, `(` and `)`, are used to find repeat substrings. You put the regex of the pattern that will repeat in between the parentheses.
+Puedes buscar subcadenas repetidas utilizando grupos de captura. Los paréntesis, `(` y `)`, son usados para encontrar subcadenas repetidas. Introduces la expresión regular del patrón que se repetirá entre los paréntesis.
-To specify where that repeat string will appear, you use a backslash (\\
) and then a number. This number starts at 1 and increases with each additional capture group you use. An example would be `\1` to match the first group.
+Para especificar donde aparecerá esa cadena repetida, utilizarás una barra invertida (`\`) y luego un número. Este número inicia en 1 e incrementa con cada grupo de captura adicional que utilices. Un ejemplo podría ser `\1` para coincidir con el primer grupo.
-The example below matches any word that occurs twice separated by a space:
+El siguiente ejemplo encuentra cualquier palabra que ocurra dos veces separada por un espacio:
```js
let repeatStr = "regex regex";
let repeatRegex = /(\w+)\s\1/;
-repeatRegex.test(repeatStr); // Returns true
-repeatStr.match(repeatRegex); // Returns ["regex regex", "regex"]
+repeatRegex.test(repeatStr);
+repeatStr.match(repeatRegex);
```
-Using the `.match()` method on a string will return an array with the string it matches, along with its capture group.
+La llamada a la función `test` devolverá `true`, y la llamada a la función `match` devolverá `["regex regex", "regex"]`.
+
+Utilizar el método `.match()` en una cadena devuelve un arreglo con la cadena que coincide, junto con su grupo de captura.
# --instructions--
-Use capture groups in `reRegex` to match a string that consists of only the same number repeated exactly three times separated by single spaces.
+Utiliza los grupos de captura en `reRegex` para que coincida con una cadena que conste sólo del mismo número repetido exactamente tres veces separado por espacios.
# --hints--
-Your regex should use the shorthand character class for digits.
+Tu expresión regular debe utilizar la clase de caracteres abreviada para los dígitos.
```js
assert(reRegex.source.match(/\\d/));
```
-Your regex should reuse a capture group twice.
+Tu expresión regular debe reutilizar un grupo de captura dos veces.
```js
assert(reRegex.source.match(/\\1|\\2/g).length >= 2);
```
-Your regex should match `"42 42 42"`.
+Tu expresión regular debe coincidir con la cadena `42 42 42`.
```js
assert(reRegex.test('42 42 42'));
```
-Your regex should match `"100 100 100"`.
+Tu expresión regular debe coincidir con la cadena `100 100 100`.
```js
assert(reRegex.test('100 100 100'));
```
-Your regex should not match `"42 42 42 42"`.
+Tu expresión regular no debe coincidir con la cadena `42 42 42 42`.
```js
assert.equal('42 42 42 42'.match(reRegex.source), null);
```
-Your regex should not match `"42 42"`.
+Tu expresión regular no debe coincidir con la cadena `42 42`.
```js
assert.equal('42 42'.match(reRegex.source), null);
```
-Your regex should not match `"101 102 103"`.
+Tu expresión regular no debe coincidir con la cadena `101 102 103`.
```js
assert(!reRegex.test('101 102 103'));
```
-Your regex should not match `"1 2 3"`.
+Tu expresión regular no debe coincidir con la cadena `1 2 3`.
```js
assert(!reRegex.test('1 2 3'));
```
-Your regex should match `"10 10 10"`.
+Tu expresión regular debe coincidir con la cadena `10 10 10`.
```js
assert(reRegex.test('10 10 10'));
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/specify-only-the-lower-number-of-matches.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/specify-only-the-lower-number-of-matches.md
index f75994614f..1340241b88 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/specify-only-the-lower-number-of-matches.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/specify-only-the-lower-number-of-matches.md
@@ -1,6 +1,6 @@
---
id: 587d7db9367417b2b2512ba6
-title: Specify Only the Lower Number of Matches
+title: Especifica solo el menor número de coincidencias
challengeType: 1
forumTopicId: 301366
dashedName: specify-only-the-lower-number-of-matches
@@ -8,65 +8,67 @@ dashedName: specify-only-the-lower-number-of-matches
# --description--
-You can specify the lower and upper number of patterns with quantity specifiers using curly brackets. Sometimes you only want to specify the lower number of patterns with no upper limit.
+Puedes especificar el número inferior y superior de patrones mediante especificadores de cantidad utilizando llaves. A veces sólo se quiere especificar el número inferior de patrones sin tener un límite superior.
-To only specify the lower number of patterns, keep the first number followed by a comma.
+Para especificar sólo el número inferior de patrones, mantén el primer número seguido de una coma.
-For example, to match only the string `"hah"` with the letter `a` appearing at least `3` times, your regex would be `/ha{3,}h/`.
+Por ejemplo, para hacer coincidir solo con la cadena `hah` cuando la letra `a` aparezca al menos `3` veces, la expresión regular sería `/ha{3,}h/`.
```js
let A4 = "haaaah";
let A2 = "haah";
let A100 = "h" + "a".repeat(100) + "h";
let multipleA = /ha{3,}h/;
-multipleA.test(A4); // Returns true
-multipleA.test(A2); // Returns false
-multipleA.test(A100); // Returns true
+multipleA.test(A4);
+multipleA.test(A2);
+multipleA.test(A100);
```
+En orden, las tres llamadas a `test` devuelven `true`, `false` y `true`.
+
# --instructions--
-Change the regex `haRegex` to match the word `"Hazzah"` only when it has four or more letter `z`'s.
+Modifica la expresión regular `haRegex` para coincidir con la palabra `Hazzah` solo cuando ésta tiene cuatro o más letras `z`.
# --hints--
-Your regex should use curly brackets.
+La expresión regular debe utilizar llaves.
```js
assert(haRegex.source.match(/{.*?}/).length > 0);
```
-Your regex should not match `"Hazzah"`
+La expresión regular no debe coincidir con la cadena `Hazzah`
```js
assert(!haRegex.test('Hazzah'));
```
-Your regex should not match `"Hazzzah"`
+La expresión regular no debe coincidir con la cadena `Hazzzah`
```js
assert(!haRegex.test('Hazzzah'));
```
-Your regex should match `"Hazzzzah"`
+La expresión regular debe coincidir con la cadena `Hazzzzah`
```js
assert('Hazzzzah'.match(haRegex)[0].length === 8);
```
-Your regex should match `"Hazzzzzah"`
+La expresión regular debe coincidir con la cadena `Hazzzzzah`
```js
assert('Hazzzzzah'.match(haRegex)[0].length === 9);
```
-Your regex should match `"Hazzzzzzah"`
+La expresión regular debe coincidir con la cadena `Hazzzzzzah`
```js
assert('Hazzzzzzah'.match(haRegex)[0].length === 10);
```
-Your regex should match `"Hazzah"` with 30 `z`'s in it.
+La expresión regular debe coincidir con la cadena `Hazzah` con 30 `z`'s.
```js
assert('Hazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzah'.match(haRegex)[0].length === 34);
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/specify-upper-and-lower-number-of-matches.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/specify-upper-and-lower-number-of-matches.md
index 83ed14cecc..d3675d1375 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/specify-upper-and-lower-number-of-matches.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/specify-upper-and-lower-number-of-matches.md
@@ -1,6 +1,6 @@
---
id: 587d7db9367417b2b2512ba5
-title: Specify Upper and Lower Number of Matches
+title: Especifica el menor y mayor número de coincidencias
challengeType: 1
forumTopicId: 301367
dashedName: specify-upper-and-lower-number-of-matches
@@ -8,63 +8,65 @@ dashedName: specify-upper-and-lower-number-of-matches
# --description--
-Recall that you use the plus sign `+` to look for one or more characters and the asterisk `*` to look for zero or more characters. These are convenient but sometimes you want to match a certain range of patterns.
+Recuerda que se utiliza el signo más `+` para buscar uno o más caracteres y el asterisco `*` para buscar cero o más caracteres. Esto es conveniente, pero a veces quieres coincidir con cierta gama de patrones.
-You can specify the lower and upper number of patterns with quantity specifiers. Quantity specifiers are used with curly brackets (`{` and `}`). You put two numbers between the curly brackets - for the lower and upper number of patterns.
+Puedes especificar el número inferior y superior de patrones utilizando especificadores de cantidad. Para los especificadores de cantidad utilizamos llaves (`{` y `}`). Pon dos números entre las llaves - para el número inferior y superior de patrones.
-For example, to match only the letter `a` appearing between `3` and `5` times in the string `"ah"`, your regex would be `/a{3,5}h/`.
+Por ejemplo, para que coincida con la letra `a` si aparece entre `3` y `5` veces en la cadena `ah`, la expresión regular debe ser `/a{3,5}h/`.
```js
let A4 = "aaaah";
let A2 = "aah";
let multipleA = /a{3,5}h/;
-multipleA.test(A4); // Returns true
-multipleA.test(A2); // Returns false
+multipleA.test(A4);
+multipleA.test(A2);
```
+La primera llamada a `test` devuelve `true`, mientras que la segunda devuelve `false`.
+
# --instructions--
-Change the regex `ohRegex` to match the entire phrase `"Oh no"` only when it has `3` to `6` letter `h`'s.
+Modifica la expresión regular `ohRegex` para que coincida con toda la frase `Oh no` solo cuando tenga de `3` a `6` letras `h`.
# --hints--
-Your regex should use curly brackets.
+La expresión regular debe utilizar llaves.
```js
assert(ohRegex.source.match(/{.*?}/).length > 0);
```
-Your regex should not match `"Ohh no"`
+La expresión regular no debe coincidir con la cadena `Ohh no`
```js
assert(!ohRegex.test('Ohh no'));
```
-Your regex should match `"Ohhh no"`
+La expresión regular debe coincidir con la cadena `Ohhh no`
```js
assert('Ohhh no'.match(ohRegex)[0].length === 7);
```
-Your regex should match `"Ohhhh no"`
+La expresión regular no debe coincidir con la cadena `Ohhhh no`
```js
assert('Ohhhh no'.match(ohRegex)[0].length === 8);
```
-Your regex should match `"Ohhhhh no"`
+La expresión regular debe coincidir con la cadena `Ohhhhh no`
```js
assert('Ohhhhh no'.match(ohRegex)[0].length === 9);
```
-Your regex should match `"Ohhhhhh no"`
+La expresión regular debe coincidir con la cadena `Ohhhhhh no`
```js
assert('Ohhhhhh no'.match(ohRegex)[0].length === 10);
```
-Your regex should not match `"Ohhhhhhh no"`
+La expresión regular no debe coincidir con la cadena `Ohhhhhhh no`
```js
assert(!ohRegex.test('Ohhhhhhh no'));
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/use-capture-groups-to-search-and-replace.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/use-capture-groups-to-search-and-replace.md
index d7d2771dae..837884f3a6 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/use-capture-groups-to-search-and-replace.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/use-capture-groups-to-search-and-replace.md
@@ -1,6 +1,6 @@
---
id: 587d7dbb367417b2b2512bab
-title: Use Capture Groups to Search and Replace
+title: Usa grupos de captura para buscar y reemplazar
challengeType: 1
forumTopicId: 301368
dashedName: use-capture-groups-to-search-and-replace
@@ -8,55 +8,57 @@ dashedName: use-capture-groups-to-search-and-replace
# --description--
-Searching is useful. However, you can make searching even more powerful when it also changes (or replaces) the text you match.
+La búsqueda es útil. Sin embargo, puedes hacer que la búsqueda sea aún más poderosa si también cambias (o reemplazas) el texto con el que coincide.
-You can search and replace text in a string using `.replace()` on a string. The inputs for `.replace()` is first the regex pattern you want to search for. The second parameter is the string to replace the match or a function to do something.
+Puedes buscar y reemplazar texto en una cadena usando `.replace()` en una cadena. Las entradas para `.replace()` son primero el patrón de expresiones regulares que deseas buscar. El segundo parámetro es la cadena para reemplazar la coincidencia o una función para hacer algo.
```js
let wrongText = "The sky is silver.";
let silverRegex = /silver/;
wrongText.replace(silverRegex, "blue");
-// Returns "The sky is blue."
```
-You can also access capture groups in the replacement string with dollar signs (`$`).
+La llamada `replace` devolverá la cadena `The sky is blue.`.
+
+También puedes acceder a grupos de captura en la cadena de reemplazo con signos de dólar. (`$`).
```js
"Code Camp".replace(/(\w+)\s(\w+)/, '$2 $1');
-// Returns "Camp Code"
```
+La llamada `replace` devolverá la cadena `Camp Code`.
+
# --instructions--
-Write a regex `fixRegex` using three capture groups that will search for each word in the string "one two three". Then update the `replaceText` variable to replace "one two three" with the string "three two one" and assign the result to the `result` variable. Make sure you are utilizing capture groups in the replacement string using the dollar sign (`$`) syntax.
+Escribe una expresión regular `fixRegex` utilizando tres grupos de captura que buscarán cada palabra en la cadena `one two three`. Luego actualiza la variable `replaceText` para reemplazar `one two three` con la cadena `three two one` y asigna el resultado a la variable `result`. Asegúrate de utilizar grupos de captura en la cadena de reemplazo utilizando la sintaxis del signo de dólar (`$`).
# --hints--
-You should use `.replace()` to search and replace.
+Debes utilizar `.replace()` para buscar y reemplazar.
```js
assert(code.match(/\.replace\(.*\)/));
```
-Your regex should change `"one two three"` to `"three two one"`
+Tu expresión regular debe cambiar la cadena `one two three` a la cadena `three two one`
```js
assert(result === 'three two one');
```
-You should not change the last line.
+No debes cambiar la última línea.
```js
assert(code.match(/result\s*=\s*str\.replace\(.*?\)/));
```
-`fixRegex` should use at least three capture groups.
+`fixRegex` debe usar al menos tres grupos de captura.
```js
assert(new RegExp(fixRegex.source + '|').exec('').length - 1 >= 3);
```
-`replaceText` should use parenthesized submatch string(s) (i.e. the nth parenthesized submatch string, $n, corresponds to the nth capture group).
+`replaceText` debe usar cadena(s) de subcoincidencia entre paréntesis (es decir, la enésima cadena de subcoincidencia entre parentesis, $n, corresponde al enésimo grupo de captura).
```js
{
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/using-the-test-method.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/using-the-test-method.md
index e39467f661..fb00ffca4f 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/using-the-test-method.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/regular-expressions/using-the-test-method.md
@@ -1,6 +1,6 @@
---
id: 587d7db3367417b2b2512b8e
-title: Using the Test Method
+title: Usa el método "test"
challengeType: 1
forumTopicId: 301369
dashedName: using-the-test-method
@@ -8,32 +8,33 @@ dashedName: using-the-test-method
# --description--
-Regular expressions are used in programming languages to match parts of strings. You create patterns to help you do that matching.
+Las expresiones regulares se utilizan en lenguajes de programación para coincidir con partes de cadenas. Creas patrones para ayudarte a hacer esa coincidencia.
-If you want to find the word `"the"` in the string `"The dog chased the cat"`, you could use the following regular expression: `/the/`. Notice that quote marks are not required within the regular expression.
+Si quieres encontrar la palabra `the` en la cadena `The dog chased the cat`, puedes utilizar la siguiente expresión regular: `/the/`. Ten en cuenta que las comillas no son requeridas dentro de la expresión regular.
-JavaScript has multiple ways to use regexes. One way to test a regex is using the `.test()` method. The `.test()` method takes the regex, applies it to a string (which is placed inside the parentheses), and returns `true` or `false` if your pattern finds something or not.
+JavaScript tiene múltiples formas de usar expresiones regulares. Una forma de probar una expresión regular es usando el método `.test()`. El método `.test()` toma la expresión regular, la aplica a una cadena (que se coloca dentro de los paréntesis), y devuelve `true` o `false` si tu patrón encuentra algo o no.
```js
let testStr = "freeCodeCamp";
let testRegex = /Code/;
testRegex.test(testStr);
-// Returns true
```
+El método `test` aquí devuelve `true`.
+
# --instructions--
-Apply the regex `myRegex` on the string `myString` using the `.test()` method.
+Aplica la expresión regular `myRegex` en la cadena `myString` usando el método `.test()`.
# --hints--
-You should use `.test()` to test the regex.
+Debes usar `.test()` para probar la expresión regular.
```js
assert(code.match(/myRegex.test\(\s*myString\s*\)/));
```
-Your result should return `true`.
+Tu resultado debe devolver `true`.
```js
assert(result === true);