From ded18ded6872f5162e900555dd3a3b2bb5e57b55 Mon Sep 17 00:00:00 2001 From: CamperBot Date: Wed, 31 Mar 2021 22:38:36 +0900 Subject: [PATCH] chore(i8n,curriculum): processed translations (#41707) Co-authored-by: Crowdin Bot --- ...e-property-to-scale-an-element-on-hover.md | 2 +- ...y-to-create-a-column-in-the-tweet-embed.md | 2 +- ...ound-assignment-with-augmented-division.md | 14 +++++++---- ...ssignment-with-augmented-multiplication.md | 14 +++++++---- ...d-assignment-with-augmented-subtraction.md | 14 +++++++---- .../declare-string-variables.md | 10 ++++---- ...te-random-whole-numbers-with-javascript.md | 4 +++- ...ate-random-whole-numbers-within-a-range.md | 4 +++- .../increment-a-number-with-javascript.md | 8 +++++-- ...-variables-with-the-assignment-operator.md | 4 +++- ...plete-a-promise-with-resolve-and-reject.md | 8 +++---- .../es6/create-a-module-script.md | 2 +- ...rences-between-the-var-and-let-keywords.md | 2 +- .../es6/use-export-to-share-a-code-block.md | 4 ++-- ...reset-an-inherited-constructor-property.md | 2 +- .../understand-own-properties.md | 18 +++++++------- ...ype-properties-to-reduce-duplicate-code.md | 24 +++++++++---------- ...rithms-and-data-structures-certificate.yml | 12 +++++----- 18 files changed, 87 insertions(+), 61 deletions(-) diff --git a/curriculum/challenges/espanol/01-responsive-web-design/applied-visual-design/use-the-css-transform-scale-property-to-scale-an-element-on-hover.md b/curriculum/challenges/espanol/01-responsive-web-design/applied-visual-design/use-the-css-transform-scale-property-to-scale-an-element-on-hover.md index 72f8457d40..29aef62523 100644 --- a/curriculum/challenges/espanol/01-responsive-web-design/applied-visual-design/use-the-css-transform-scale-property-to-scale-an-element-on-hover.md +++ b/curriculum/challenges/espanol/01-responsive-web-design/applied-visual-design/use-the-css-transform-scale-property-to-scale-an-element-on-hover.md @@ -19,7 +19,7 @@ p:hover { } ``` -Nota: La aplicación de una transformación a un elemento `div` también afectará a cualquier elemento secundario contenido de el div. +**Nota:** La aplicación de una transformación a un elemento `div` también afectará a cualquier elemento secundario contenido del div. # --instructions-- diff --git a/curriculum/challenges/espanol/01-responsive-web-design/css-flexbox/apply-the-flex-direction-property-to-create-a-column-in-the-tweet-embed.md b/curriculum/challenges/espanol/01-responsive-web-design/css-flexbox/apply-the-flex-direction-property-to-create-a-column-in-the-tweet-embed.md index 8a90a3c4a7..86b87a51be 100644 --- a/curriculum/challenges/espanol/01-responsive-web-design/css-flexbox/apply-the-flex-direction-property-to-create-a-column-in-the-tweet-embed.md +++ b/curriculum/challenges/espanol/01-responsive-web-design/css-flexbox/apply-the-flex-direction-property-to-create-a-column-in-the-tweet-embed.md @@ -1,6 +1,6 @@ --- id: 587d78ac367417b2b2512af5 -title: Aplica la propiedad flex-direction para crear filas en el tweet insertado +title: Aplica la propiedad flex-direction para crear columnas en el tweet insertado challengeType: 0 videoUrl: 'https://scrimba.com/p/pVaDAv/cnzdVC9' forumTopicId: 301103 diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-division.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-division.md index c43d2601dc..1ab106d4a5 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-division.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-division.md @@ -11,15 +11,19 @@ dashedName: compound-assignment-with-augmented-division El operador `/=` divide una variable entre otro número. -`myVar = myVar / 5;` +```js +myVar = myVar / 5; +``` -Dividirá `myVar` entre `5`. Esto se puede reescribir como: +Dividirá `myVar` por `5`. Esto se puede reescribir como: -`myVar /= 5;` +```js +myVar /= 5; +``` # --instructions-- -Convierte las asignaciones de `a`, `b` y `c` para que utilicen el operador `/=`. +Convierte las tareas de `a`, `b`, y `c` para utilizar el operador `/=`. # --hints-- @@ -47,7 +51,7 @@ Debes usar el operador `/=` para cada variable. assert(code.match(/\/=/g).length === 3); ``` -No debes modificar el código por encima del comentario especificado. +No debes modificar el código sobre el comentario especificado. ```js assert( diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-multiplication.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-multiplication.md index 80ad961121..512e7f17f9 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-multiplication.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-multiplication.md @@ -11,15 +11,19 @@ dashedName: compound-assignment-with-augmented-multiplication El operador `*=` multiplica una variable por un número. -`myVar = myVar * 5;` +```js +myVar = myVar * 5; +``` -multiplicará `myVar` por `5`. Esto se puede reescribir como: +se multiplicará `myVar` por `5`. Esto se puede reescribir como: -`myVar *= 5;` +```js +myVar *= 5; +``` # --instructions-- -Convierte las asignaciones de `a`, `b` y `c` para que utilicen el operador `*=`. +Convierte las tareas de `a`, `b`, y `c` para utilizar el operador `*=`. # --hints-- @@ -47,7 +51,7 @@ Debes usar el operador `*=` para cada variable. assert(code.match(/\*=/g).length === 3); ``` -No debes modificar el código por encima del comentario especificado. +No debes modificar el código sobre el comentario especificado. ```js assert( diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-subtraction.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-subtraction.md index b672db2a90..99580fc9fc 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-subtraction.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-subtraction.md @@ -11,15 +11,19 @@ dashedName: compound-assignment-with-augmented-subtraction Al igual que el operador `+=`, `-=` resta un número de una variable. -`myVar = myVar - 5;` +```js +myVar = myVar - 5; +``` -restará `5` de `myVar`. Esto se puede reescribir como: +le restara `5` de `myVar`. Esto se puede reescribir como: -`myVar -= 5;` +```js +myVar -= 5; +``` # --instructions-- -Convierte las asignaciones de `a`, `b` y `c` para que utilicen el operador `-=`. +Convierte las tareas de `a`, `b`, y `c` para utilizar el operador `-=`. # --hints-- @@ -47,7 +51,7 @@ Debes usar el operador `-=` para cada variable. assert(code.match(/-=/g).length === 3); ``` -No debes modificar el código por encima del comentario especificado. +No debes modificar el código sobre el comentario especificado. ```js assert( diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/declare-string-variables.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/declare-string-variables.md index be76f9adb7..4851f76c38 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/declare-string-variables.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/declare-string-variables.md @@ -11,17 +11,19 @@ dashedName: declare-string-variables Anteriormente hemos usado el código -`var myName = "your name";` +```js +var myName = "your name"; +``` -`"your name"` es llamada una cadena literal. Es una cadena porque es una serie de cero o más caracteres encerrados entre comillas simples o dobles. +`"your name"` es conocida como una cadena literal. Es una cadena porque es una serie de cero o más caracteres encerrados en comillas simples o dobles. # --instructions-- -Crea dos nuevas variables de cadena: `myFirstName` y `myLastName` y asígnales los valores de tu nombre y apellido, respectivamente. +Crea dos nuevas variables de tipo cadena: `myFirstName`(miNombre) y `myLastName`(miApellido) y asígnales tu nombre y apellido, respectivamente. # --hints-- -`myFirstName` debe ser una cadena con al menos un carácter en ella. +`myFirstName` debe ser una cadena con al menos un carácter. ```js assert( diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-whole-numbers-with-javascript.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-whole-numbers-with-javascript.md index f71600a49f..13223e5da8 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-whole-numbers-with-javascript.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-whole-numbers-with-javascript.md @@ -17,7 +17,9 @@ Recuerda que `Math.random()` nunca devolverá un `1` y porque estamos redondeand Poniendo todo junto, así es como se ve nuestro código: -`Math.floor(Math.random() * 20);` +```js +Math.floor(Math.random() * 20); +``` Estamos llamando a `Math.random()`, multiplicando el resultado por 20 y pasando el valor a la función `Math.floor()` para redondear el valor hacia abajo al número entero más cercano. diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-whole-numbers-within-a-range.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-whole-numbers-within-a-range.md index eb87bbe502..491b7be1bb 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-whole-numbers-within-a-range.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-whole-numbers-within-a-range.md @@ -15,7 +15,9 @@ Para ello, definiremos un número mínimo `min` y un número máximo `max`. Esta es la fórmula que utilizaremos. Tómate un momento para leerla e intenta entender lo que este código está haciendo: -`Math.floor(Math.random() * (max - min + 1)) + min` +```js +Math.floor(Math.random() * (max - min + 1)) + min +``` # --instructions-- diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md index b9726deb55..0327dea07c 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md @@ -11,11 +11,15 @@ dashedName: increment-a-number-with-javascript Puedes fácilmente incrementar o sumar uno a una variable con el operador `++`. -`i++;` +```js +i++; +``` es equivalente a -`i = i + 1;` +```js +i = i + 1; +``` **Nota:** Toda la línea se convierte en `i++;`, eliminando la necesidad del signo de igualdad. diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/initializing-variables-with-the-assignment-operator.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/initializing-variables-with-the-assignment-operator.md index 0fd7c2afde..53e9008b3d 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/initializing-variables-with-the-assignment-operator.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/initializing-variables-with-the-assignment-operator.md @@ -11,7 +11,9 @@ dashedName: initializing-variables-with-the-assignment-operator Es común inicializar una variable a un valor inicial en la misma línea que es declarada. -`var myVar = 0;` +```js +var myVar = 0; +``` Crea una nueva variable llamada `myVar` y le asigna un valor inicial de `0`. diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/complete-a-promise-with-resolve-and-reject.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/complete-a-promise-with-resolve-and-reject.md index f09f1282bf..7a8fcad374 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/complete-a-promise-with-resolve-and-reject.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/complete-a-promise-with-resolve-and-reject.md @@ -1,6 +1,6 @@ --- id: 5cdafbc32913098997531680 -title: Cumple una Promesa con "Resolve" y "Reject" +title: Cumpleta una promesa con "resolve" y "reject" challengeType: 1 forumTopicId: 301196 dashedName: complete-a-promise-with-resolve-and-reject @@ -8,7 +8,7 @@ dashedName: complete-a-promise-with-resolve-and-reject # --description-- -Una promesa tiene tres estados: `pending`, `fulfilled`, y `rejected`. La promesa creada en el último desafío está atascada en el estado `pending` porque no añadiste una forma de completar la promesa. Los parámetros `resolve` y `reject` enviados a "promise" como argumentos, son utilizados para hacer lo siguiente. `resolve` se utiliza, cuando la promesa es cumplida y `reject` cuando es rechazada. Estos son métodos que toman un argumento, como se ve a continuación. +Una promesa tiene tres estados: `pending`, `fulfilled`, y `rejected`. La promesa que creaste en el último desafío está atascada en el estado `pending` porque no añadiste una forma de completar la promesa. Los parámetros `resolve` y `reject` enviados a "promise" como argumentos, son utilizados para hacer lo siguiente. `resolve` se utiliza cuando quieres que tu promesa tenga éxito, y `reject` se usa cuando quieres que falle. Estos son métodos que toman un argumento, como se ve a continuación. ```js const myPromise = new Promise((resolve, reject) => { @@ -20,11 +20,11 @@ const myPromise = new Promise((resolve, reject) => { }); ``` -El ejemplo anterior usa cadenas como argumento de las funciones, pero podrían ser cualquier otra cosa. A menudo, podría ser un objeto, del que utilizas datos, para colocar en tu sitio web o en otro lugar. +El ejemplo anterior utiliza cadenas como argumento de las funciones, pero podrían ser cualquier otra cosa. El argumento a menudo puede ser un objeto del cual utilizarás datos que mostrarás en tu sitio web o en otro lugar. # --instructions-- -Haga una función promesa que maneje el éxito y el fallo. Si `responseFromServer` es `true`, llame al método `resolve` para completar satisfactoriamente la promesa. Pasa a `resolve` una cadena con el valor `We got the data`. Si `responseFromServer` es `false`, utiliza el método `reject` y devuelve la cadena: `Data not received`. +Haz una función promesa que maneje el éxito y el fallo. Si `responseFromServer` es `true`, llama al método `resolve` para completar satisfactoriamente la promesa. Pasa a `resolve` una cadena con el valor `We got the data`. Si `responseFromServer` es `false`, utiliza el método `reject` y devuelve la cadena: `Data not received`. # --hints-- diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/create-a-module-script.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/create-a-module-script.md index 2bd6c6b02f..ec7d0442db 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/create-a-module-script.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/create-a-module-script.md @@ -28,7 +28,7 @@ Debes crear una etiqueta `script`. assert(code.match(/<\s*script[^>]*>\s*<\/\s*script\s*>/g)); ``` -Tu etiqueta `input` debe tener un atributo `type` con un valor de `date`. +Tu etiqueta `script` debe tener un atributo `type` con un valor de `module`. ```js assert( diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/explore-differences-between-the-var-and-let-keywords.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/explore-differences-between-the-var-and-let-keywords.md index 28187048b3..da734ad37b 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/explore-differences-between-the-var-and-let-keywords.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/explore-differences-between-the-var-and-let-keywords.md @@ -8,7 +8,7 @@ dashedName: explore-differences-between-the-var-and-let-keywords # --description-- -Uno de los grandes problemas con la declaración de variables, usando la palabra clave `var`, es que tu puedes sobrescribir declaraciones de variables sin un error. +Uno de los mayores problemas con la declaración de variables utilizando la palabra clave `var` es que tú puedes sobrescribir declaraciones de variables sin un error. ```js var camper = 'James'; diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-export-to-share-a-code-block.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-export-to-share-a-code-block.md index 1b1a135605..aecf3c0610 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-export-to-share-a-code-block.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-export-to-share-a-code-block.md @@ -38,7 +38,7 @@ Hay dos funciones relacionadas con cadenas en el editor. Exporta ambos utilizand # --hints-- -Deberías exportar correctamente `uppercaseString`. +Debes exportar correctamente `uppercaseString`. ```js assert( @@ -48,7 +48,7 @@ assert( ); ``` -Deberías exportar correctamente `lowercaseString`. +Debes exportar correctamente `lowercaseString`. ```js assert( diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property.md index 90d2765a0c..9741aa37fb 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property.md @@ -1,6 +1,6 @@ --- id: 587d7db1367417b2b2512b86 -title: Restablece una propiedad constructor heredada +title: Restablece una propiedad "constructor" heredada challengeType: 1 forumTopicId: 301324 dashedName: reset-an-inherited-constructor-property diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties.md index f4f369581c..ce2b28d68e 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties.md @@ -1,6 +1,6 @@ --- id: 587d7dae367417b2b2512b7b -title: Understand Own Properties +title: Comprender las propiedades propias (ownProps) challengeType: 1 forumTopicId: 301326 dashedName: understand-own-properties @@ -8,7 +8,7 @@ dashedName: understand-own-properties # --description-- -In the following example, the `Bird` constructor defines two properties: `name` and `numLegs`: +En el siguiente ejemplo, el constructor `Bird` define dos propiedades: `name` y `numLegs`: ```js function Bird(name) { @@ -20,7 +20,7 @@ let duck = new Bird("Donald"); let canary = new Bird("Tweety"); ``` -`name` and `numLegs` are called `own` properties, because they are defined directly on the instance object. That means that `duck` and `canary` each has its own separate copy of these properties. In fact every instance of `Bird` will have its own copy of these properties. The following code adds all of the `own` properties of `duck` to the array `ownProps`: +`name` y `numLegs` se llaman propiedades propias, porque están definidas directamente en la instancia del objeto. Eso significa que `duck` y `canary` tienen su propia copia separada de estas propiedades. De hecho, cada instancia de `Bird` tendrá su propia copia de estas propiedades. El siguiente código añade todas las propiedades propias de `duck` al arreglo `ownProps`: ```js let ownProps = []; @@ -31,28 +31,30 @@ for (let property in duck) { } } -console.log(ownProps); // prints [ "name", "numLegs" ] +console.log(ownProps); ``` +La consola mostrará el valor `["name", "numLegs"]`. + # --instructions-- -Add the `own` properties of `canary` to the array `ownProps`. +Agrega todas las propiedades propias de `canary` al arreglo `ownProps`. # --hints-- -`ownProps` should include the values `"numLegs"` and `"name"`. +`ownProps` debe incluir los valores `numLegs` y `name`. ```js assert(ownProps.indexOf('name') !== -1 && ownProps.indexOf('numLegs') !== -1); ``` -You should solve this challenge without using the built in method `Object.keys()`. +Debes resolver este desafío sin usar el método `Object.keys()`. ```js assert(!/Object(\.keys|\[(['"`])keys\2\])/.test(code)); ``` -You should solve this challenge without hardcoding the `ownProps` array. +Debes resolver este desafío sin hacer una programación fija (hardcoding) del arreglo `ownProps`. ```js assert( diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md index 2f0875f8c3..a02dd72c05 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md @@ -1,6 +1,6 @@ --- id: 587d7dae367417b2b2512b7c -title: Use Prototype Properties to Reduce Duplicate Code +title: Utiliza propiedades "prototype" para reducir código duplicado challengeType: 1 forumTopicId: 301336 dashedName: use-prototype-properties-to-reduce-duplicate-code @@ -8,44 +8,44 @@ dashedName: use-prototype-properties-to-reduce-duplicate-code # --description-- -Since `numLegs` will probably have the same value for all instances of `Bird`, you essentially have a duplicated variable `numLegs` inside each `Bird` instance. +Dado que `numLegs` probablemente tendrán el mismo valor para todas las instancias de `Bird`, esencialmente tienes una variable duplicada `numLegs` dentro de cada instancia de `Bird`. -This may not be an issue when there are only two instances, but imagine if there are millions of instances. That would be a lot of duplicated variables. +Esto puede que no sea un problema cuando sólo hay dos instancias, pero imagina si hay millones de instancias. Eso sería un montón de variables duplicadas. -A better way is to use `Bird’s` `prototype`. Properties in the `prototype` are shared among ALL instances of `Bird`. Here's how to add `numLegs` to the `Bird prototype`: +Una mejor manera es usar `Bird’s` `prototype`. Las propiedades del `prototype` se comparten entre TODAS las instancias de `Bird`. A continuación se explica cómo añadir `numLegs` al prototipo `Bird prototype`: ```js Bird.prototype.numLegs = 2; ``` -Now all instances of `Bird` have the `numLegs` property. +Ahora todas las instancias de `Bird` tienen la propiedad `numLegs`. ```js -console.log(duck.numLegs); // prints 2 -console.log(canary.numLegs); // prints 2 +console.log(duck.numLegs); +console.log(canary.numLegs); ``` -Since all instances automatically have the properties on the `prototype`, think of a `prototype` as a "recipe" for creating objects. Note that the `prototype` for `duck` and `canary` is part of the `Bird` constructor as `Bird.prototype`. Nearly every object in JavaScript has a `prototype` property which is part of the constructor function that created it. +Dado que todas las instancias tienen automáticamente las propiedades en el `prototype`, piensa en `prototype` como una "receta" para crear objetos. Ten en cuenta que el `prototype` de `duck` y `canary` es parte del constructor `Bird` como `Bird.prototype`. Casi todos los objetos en JavaScript tienen una propiedad `prototype` que es parte de la función constructora que lo creó. # --instructions-- -Add a `numLegs` property to the `prototype` of `Dog` +Añade una propiedad `numLegs` al `prototype` de `Dog` # --hints-- -`beagle` should have a `numLegs` property. +`beagle` debe tener una propiedad `numLegs`. ```js assert(beagle.numLegs !== undefined); ``` -`beagle.numLegs` should be a number. +`beagle.numLegs` debe ser un número. ```js assert(typeof beagle.numLegs === 'number'); ``` -`numLegs` should be a `prototype` property not an `own` property. +`numLegs` debe ser una propiedad `prototype`, no una propiedad `own`. ```js assert(beagle.hasOwnProperty('numLegs') === false); diff --git a/curriculum/challenges/espanol/12-certificates/javascript-algorithms-and-data-structures-certificate/javascript-algorithms-and-data-structures-certificate.yml b/curriculum/challenges/espanol/12-certificates/javascript-algorithms-and-data-structures-certificate/javascript-algorithms-and-data-structures-certificate.yml index aebebf678c..54c6a0035c 100644 --- a/curriculum/challenges/espanol/12-certificates/javascript-algorithms-and-data-structures-certificate/javascript-algorithms-and-data-structures-certificate.yml +++ b/curriculum/challenges/espanol/12-certificates/javascript-algorithms-and-data-structures-certificate/javascript-algorithms-and-data-structures-certificate.yml @@ -1,21 +1,21 @@ --- id: 561abd10cb81ac38a17513bc -title: JavaScript Algorithms and Data Structures Certificate +title: Certificado de Algoritmos en JavaScript y Estructuras de Datos challengeType: 7 isPrivate: true tests: - id: aaa48de84e1ecc7c742e1124 - title: Palindrome Checker + title: Comprobador de palíndromos - id: a7f4d8f2483413a6ce226cac - title: Roman Numeral Converter + title: Conversor de números romanos - id: 56533eb9ac21ba0edf2244e2 - title: Caesars Cipher + title: Caesars cipher - id: aff0395860f5d3034dc0bfc9 - title: Telephone Number Validator + title: Validador de número telefónico - id: aa2e6f85cab2ab736c9a9b24 - title: Cash Register + title: Caja registradora