chore(i18n,curriculum): update translations (#41792)
This commit is contained in:
@ -23,10 +23,19 @@ dashedName: change-a-variable-for-a-specific-area
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
assert(
|
assert(
|
||||||
code.match(/\.penguin\s*?{[\s\S]*(?<!background-color: )--penguin-belly\s*?:\s?white\s*?;[\s\S]*}/gi)
|
code.match(/\.penguin\s*?{[\s\S]*--penguin-belly\s*?:\s*?white\s*?;[\s\S]*}/gi)
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
`penguin` class 不应该包含 `background-color` 属性。
|
||||||
|
|
||||||
|
```js
|
||||||
|
assert(
|
||||||
|
code.match(/^((?!background-color\s*?:\s*?)[\s\S])*$/g)
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
# --seed--
|
# --seed--
|
||||||
|
|
||||||
## --seed-contents--
|
## --seed-contents--
|
||||||
|
@ -23,10 +23,19 @@ La clase `penguin` debe reasignar la variable `--penguin-belly` a `white`.
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
assert(
|
assert(
|
||||||
code.match(/\.penguin\s*?{[\s\S]*(?<!background-color: )--penguin-belly\s*?:\s?white\s*?;[\s\S]*}/gi)
|
code.match(/\.penguin\s*?{[\s\S]*--penguin-belly\s*?:\s*?white\s*?;[\s\S]*}/gi)
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
La clase `penguin` no debe contener la propiedad `background-color`
|
||||||
|
|
||||||
|
```js
|
||||||
|
assert(
|
||||||
|
code.match(/^((?!background-color\s*?:\s*?)[\s\S])*$/g)
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
# --seed--
|
# --seed--
|
||||||
|
|
||||||
## --seed-contents--
|
## --seed-contents--
|
||||||
|
@ -40,7 +40,7 @@ ourPets[1].names[0];
|
|||||||
|
|
||||||
# --instructions--
|
# --instructions--
|
||||||
|
|
||||||
Obtén el segundo árbol de la variable `myPlants` usando la notación de puntos de objetos y la notación de corchetes de arreglos.
|
Utilizando la notación de puntos y corchetes, establezca la variable `secondTree` en el segundo elemento de la lista `trees` del objeto `myPlants`.
|
||||||
|
|
||||||
# --hints--
|
# --hints--
|
||||||
|
|
||||||
@ -72,7 +72,6 @@ assert(/=\s*myPlants\[1\].list\[1\]/.test(code));
|
|||||||
## --seed-contents--
|
## --seed-contents--
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// Setup
|
|
||||||
var myPlants = [
|
var myPlants = [
|
||||||
{
|
{
|
||||||
type: "flowers",
|
type: "flowers",
|
||||||
@ -92,9 +91,7 @@ var myPlants = [
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
// Only change code below this line
|
var secondTree = "";
|
||||||
|
|
||||||
var secondTree = ""; // Change this line
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# --solutions--
|
# --solutions--
|
||||||
@ -119,7 +116,5 @@ var myPlants = [
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
// Only change code below this line
|
|
||||||
|
|
||||||
var secondTree = myPlants[1].list[1];
|
var secondTree = myPlants[1].list[1];
|
||||||
```
|
```
|
||||||
|
@ -50,7 +50,7 @@ Debes agregar la propiedad `bark` a `myDog`.
|
|||||||
assert(myDog.bark !== undefined);
|
assert(myDog.bark !== undefined);
|
||||||
```
|
```
|
||||||
|
|
||||||
No debes agregar `bark` a la sección de configuración.
|
No debes agregar `bark` a la inicialización de `myDog`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(!/bark[^\n]:/.test(code));
|
assert(!/bark[^\n]:/.test(code));
|
||||||
@ -67,7 +67,6 @@ assert(!/bark[^\n]:/.test(code));
|
|||||||
## --seed-contents--
|
## --seed-contents--
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// Setup
|
|
||||||
var myDog = {
|
var myDog = {
|
||||||
"name": "Happy Coder",
|
"name": "Happy Coder",
|
||||||
"legs": 4,
|
"legs": 4,
|
||||||
@ -75,7 +74,7 @@ var myDog = {
|
|||||||
"friends": ["freeCodeCamp Campers"]
|
"friends": ["freeCodeCamp Campers"]
|
||||||
};
|
};
|
||||||
|
|
||||||
// Only change code below this line
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# --solutions--
|
# --solutions--
|
||||||
|
@ -18,7 +18,7 @@ for (var i = 0; i < arr.length; i++) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Recuerda que los arreglos tienen una indexación basada en cero, lo que significa que el último índice del arreglo es igual a su longitud menos uno (`length - 1`). Nuestra condición para este bucle es `i < arr.length`, que detiene el bucle cuando `i` es igual a `length`. En este caso la última iteración es `i === 4`, es decir, cuando `i` es igual a `arr.length` e imprime `6` en la consola.
|
Recuerda que los arreglos tienen una indexación basada en cero, lo que significa que el último índice del arreglo es igual a su longitud menos uno (`length - 1`). Nuestra condición para este bucle es `i < arr.length`, que detiene el bucle cuando `i` es igual a `length`. En este caso, la última iteración es `i === 4`, es decir, cuando `i` se convierte en igual a `arr.length - 1` y resultados `6` a la consola. Entonces `i` aumenta a `5`, y el bucle termina `i < arr.length` es `false`.
|
||||||
|
|
||||||
# --instructions--
|
# --instructions--
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
id: bad87fee1348bd9aec908848
|
id: bad87fee1348bd9aec908848
|
||||||
title: Create Bootstrap Wells
|
title: Crea Bootstrap wells
|
||||||
challengeType: 0
|
challengeType: 0
|
||||||
forumTopicId: 16825
|
forumTopicId: 16825
|
||||||
dashedName: create-bootstrap-wells
|
dashedName: create-bootstrap-wells
|
||||||
@ -8,25 +8,25 @@ dashedName: create-bootstrap-wells
|
|||||||
|
|
||||||
# --description--
|
# --description--
|
||||||
|
|
||||||
Bootstrap has a class called `well` that can create a visual sense of depth for your columns.
|
Bootstrap tiene una clase llamada `well` (pozo) que puede crear una ilusión visual de profundidad en las columnas.
|
||||||
|
|
||||||
Nest one `div` element with the class `well` within each of your `col-xs-6` `div` elements.
|
Incrusta un elemento `div` con la clase `well` en cada uno de los elementos `col-xs-6` y `div`.
|
||||||
|
|
||||||
# --hints--
|
# --hints--
|
||||||
|
|
||||||
You should add a `div` element with the class `well` inside each of your `div` elements with the class `"col-xs-6"`
|
Debes añadir un elemento `div` con la clase `well` dentro de cada uno de los elementos `div` con la clase `col-xs-6`
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert($('div.col-xs-6').not(':has(>div.well)').length < 1);
|
assert($('div.col-xs-6').not(':has(>div.well)').length < 1);
|
||||||
```
|
```
|
||||||
|
|
||||||
Both of your `div` elements with the class `"col-xs-6"` should be nested within your `div` element with the class `"row"`.
|
Ambos elementos `div` con la clase `col-xs-6` deben estar incrustados en el elemento `div` con la clase `row`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert($('div.row > div.col-xs-6').length > 1);
|
assert($('div.row > div.col-xs-6').length > 1);
|
||||||
```
|
```
|
||||||
|
|
||||||
All your `div` elements should have closing tags.
|
Todos los elementos `div` deben tener etiquetas de cierre.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(
|
assert(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
id: bad87fee1347bd9aedf08845
|
id: bad87fee1347bd9aedf08845
|
||||||
title: Ditch Custom CSS for Bootstrap
|
title: Deja de lado el CSS personalizado por Bootstrap
|
||||||
challengeType: 0
|
challengeType: 0
|
||||||
forumTopicId: 17565
|
forumTopicId: 17565
|
||||||
dashedName: ditch-custom-css-for-bootstrap
|
dashedName: ditch-custom-css-for-bootstrap
|
||||||
@ -8,31 +8,31 @@ dashedName: ditch-custom-css-for-bootstrap
|
|||||||
|
|
||||||
# --description--
|
# --description--
|
||||||
|
|
||||||
We can clean up our code and make our Cat Photo App look more conventional by using Bootstrap's built-in styles instead of the custom styles we created earlier.
|
Podemos limpiar nuestro código y hacer que nuestra aplicación de fotos de gatos parezca más convencional, usando los estilos incorporados de Bootstrap, en lugar de los estilos personalizados que hemos creado antes.
|
||||||
|
|
||||||
Don't worry - there will be plenty of time to customize our CSS later.
|
No te preocupes – tendremos mucho tiempo para personalizar nuestro CSS más adelante.
|
||||||
|
|
||||||
Delete the `.red-text`, `p`, and `.smaller-image` CSS declarations from your `style` element so that the only declarations left in your `style` element are `h2` and `thick-green-border`.
|
Elimina las declaraciones de CSS `.red-text`, `p` y `.smaller-image` de tu elemento `style` para que la únicas declaraciones que queden en tu elemento `style` sean `h2` y `thick-green-border`.
|
||||||
|
|
||||||
Then delete the `p` element that contains a dead link. Then remove the `red-text` class from your `h2` element and replace it with the `text-primary` Bootstrap class.
|
A continuación elimina el elemento `p` que contiene un enlace roto. Después elimina la clase `red-text` de tu elemento `h2` y reemplázala con la clase `text-primary` de Bootstrap.
|
||||||
|
|
||||||
Finally, remove the "smaller-image" class from your first `img` element and replace it with the `img-responsive` class.
|
Finalmente elimina la clase `smaller-image` de tu primer elemento `img` y reemplázala con la clase `img-responsive`.
|
||||||
|
|
||||||
# --hints--
|
# --hints--
|
||||||
|
|
||||||
Your h2 element should no longer have the class `red-text`.
|
Tu elemento `h2` ya no debería incluir la clase `red-text`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(!$('h2').hasClass('red-text'));
|
assert(!$('h2').hasClass('red-text'));
|
||||||
```
|
```
|
||||||
|
|
||||||
Your h2 element should now have the class `text-primary`.
|
Tu elemento `h2` ahora debe incluir la clase `text-primary`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert($('h2').hasClass('text-primary'));
|
assert($('h2').hasClass('text-primary'));
|
||||||
```
|
```
|
||||||
|
|
||||||
Your paragraph elements should no longer use the font `Monospace`.
|
Tus elementos p (párrafo) ya no deben usar la fuente `Monospace`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(
|
assert(
|
||||||
@ -42,13 +42,13 @@ assert(
|
|||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
The `smaller-image` class should be removed from your top image.
|
La clase `smaller-image` debe ser eliminada de tu imagen superior.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(!$('img').hasClass('smaller-image'));
|
assert(!$('img').hasClass('smaller-image'));
|
||||||
```
|
```
|
||||||
|
|
||||||
You should add the `img-responsive` class to your top image.
|
Debes añadir la clase `img-responsive` a tu imagen superior.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert($('.img-responsive').length > 1);
|
assert($('.img-responsive').length > 1);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
id: bad87fee1348bd9aec908856
|
id: bad87fee1348bd9aec908856
|
||||||
title: Label Bootstrap Buttons
|
title: Etiquetas Buttons Bootstrap
|
||||||
challengeType: 0
|
challengeType: 0
|
||||||
forumTopicId: 18222
|
forumTopicId: 18222
|
||||||
dashedName: label-bootstrap-buttons
|
dashedName: label-bootstrap-buttons
|
||||||
@ -8,43 +8,43 @@ dashedName: label-bootstrap-buttons
|
|||||||
|
|
||||||
# --description--
|
# --description--
|
||||||
|
|
||||||
Just like we labeled our wells, we want to label our buttons.
|
Al igual que hemos etiquetado nuestros "wells", queremos etiquetar nuestros botones.
|
||||||
|
|
||||||
Give each of your `button` elements text that corresponds to its `id`'s selector.
|
Da a cada uno de tus elementos `button` el texto que corresponde a su id.
|
||||||
|
|
||||||
# --hints--
|
# --hints--
|
||||||
|
|
||||||
Your `button` element with the id `target1` should have the text `#target1`.
|
Tu elemento `button` con el id `target1` debe tener el texto `#target1`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(new RegExp('#target1', 'gi').test($('#target1').text()));
|
assert(new RegExp('#target1', 'gi').test($('#target1').text()));
|
||||||
```
|
```
|
||||||
|
|
||||||
Your `button` element with the id `target2` should have the text `#target2`.
|
Tu elemento `button` con el id `target2` debe tener el texto `#target2`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(new RegExp('#target2', 'gi').test($('#target2').text()));
|
assert(new RegExp('#target2', 'gi').test($('#target2').text()));
|
||||||
```
|
```
|
||||||
|
|
||||||
Your `button` element with the id `target3` should have the text `#target3`.
|
Tu elemento `button` con el id `target3` debe tener el texto `#target3`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(new RegExp('#target3', 'gi').test($('#target3').text()));
|
assert(new RegExp('#target3', 'gi').test($('#target3').text()));
|
||||||
```
|
```
|
||||||
|
|
||||||
Your `button` element with the id `target4` should have the text `#target4`.
|
Tu elemento `button` con el id `target4` debe tener el texto `#target4`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(new RegExp('#target4', 'gi').test($('#target4').text()));
|
assert(new RegExp('#target4', 'gi').test($('#target4').text()));
|
||||||
```
|
```
|
||||||
|
|
||||||
Your `button` element with the id `target5` should have the text `#target5`.
|
Tu elemento `button` con el id `target5` debe tener el texto `#target5`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(new RegExp('#target5', 'gi').test($('#target5').text()));
|
assert(new RegExp('#target5', 'gi').test($('#target5').text()));
|
||||||
```
|
```
|
||||||
|
|
||||||
Your `button` element with the id `target6` should have the text `#target6`.
|
Tu elemento `button` con el id `target6` debe tener el texto `#target6`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(new RegExp('#target6', 'gi').test($('#target6').text()));
|
assert(new RegExp('#target6', 'gi').test($('#target6').text()));
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
id: bad87fee1348bd9aeda08845
|
id: bad87fee1348bd9aeda08845
|
||||||
title: Responsively Style Checkboxes
|
title: Casillas de verificación con estilo responsivo
|
||||||
challengeType: 0
|
challengeType: 0
|
||||||
forumTopicId: 18269
|
forumTopicId: 18269
|
||||||
required:
|
required:
|
||||||
@ -13,27 +13,27 @@ dashedName: responsively-style-checkboxes
|
|||||||
|
|
||||||
# --description--
|
# --description--
|
||||||
|
|
||||||
Since Bootstrap's `col-xs-*` classes are applicable to all `form` elements, you can use them on your checkboxes too! This way, the checkboxes will be evenly spread out across the page, regardless of how wide the screen resolution is.
|
Dado que las clases `col-xs-*` de Bootstrap son aplicables a todos los elementos `form`, ¡también puedes usarlas en tus casillas de verificación! De esta manera, las casillas de verificación se distribuirán uniformemente por toda la página, independientemente de la amplitud de la resolución de la pantalla.
|
||||||
|
|
||||||
# --instructions--
|
# --instructions--
|
||||||
|
|
||||||
Nest all three of your checkboxes in a `<div class="row">` element. Then nest each of them in a `<div class="col-xs-4">` element.
|
Anida las tres casillas de verificación en un elemento `<div class="row">`. Luego incrusta cada uno de ellos en un elemento `<div class="col-xs-4">`.
|
||||||
|
|
||||||
# --hints--
|
# --hints--
|
||||||
|
|
||||||
All of your checkboxes should be nested inside one `div` with the class `row`.
|
Todas las casillas de verificación deben anidarse dentro de un `div` con la clase `row`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert($('div.row:has(input[type="checkbox"])').length > 0);
|
assert($('div.row:has(input[type="checkbox"])').length > 0);
|
||||||
```
|
```
|
||||||
|
|
||||||
Each of your checkboxes should be nested inside its own `div` with the class `col-xs-4`.
|
Cada casilla de verificación debe inscrustarse dentro de un `div` con la clase `row`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert($('div.col-xs-4:has(input[type="checkbox"])').length > 2);
|
assert($('div.col-xs-4:has(input[type="checkbox"])').length > 2);
|
||||||
```
|
```
|
||||||
|
|
||||||
All of your `div` elements should have closing tags.
|
Todos los elementos `div` deben tener etiquetas de cierre.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(
|
assert(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
id: bad87fee1348bd9aedb08845
|
id: bad87fee1348bd9aedb08845
|
||||||
title: Responsively Style Radio Buttons
|
title: Botones radio con estilo responsivo
|
||||||
challengeType: 0
|
challengeType: 0
|
||||||
forumTopicId: 18270
|
forumTopicId: 18270
|
||||||
required:
|
required:
|
||||||
@ -13,27 +13,27 @@ dashedName: responsively-style-radio-buttons
|
|||||||
|
|
||||||
# --description--
|
# --description--
|
||||||
|
|
||||||
You can use Bootstrap's `col-xs-*` classes on `form` elements, too! This way, our radio buttons will be evenly spread out across the page, regardless of how wide the screen resolution is.
|
¡También puedes usar las clases `col-xs-*` de Bootstrap en los elementos `form`! De esta manera, nuestros botones de radio se distribuirán uniformemente por toda la página, independientemente del ancho de la resolución de la pantalla.
|
||||||
|
|
||||||
Nest both your radio buttons within a `<div class="row">` element. Then nest each of them within a `<div class="col-xs-6">` element.
|
Anida ambos botones de radio dentro de un elemento `<div class="row">`. Luego anida cada uno de ellos en un elemento `<div class="col-xs-6">`.
|
||||||
|
|
||||||
**Note:** As a reminder, radio buttons are `input` elements of type `radio`.
|
**Nota:** Como recordatorio, los botones de radio son `entradas`, elementos de tipo `radio`.
|
||||||
|
|
||||||
# --hints--
|
# --hints--
|
||||||
|
|
||||||
All of your radio buttons should be nested inside one `div` with the class `row`.
|
Todas las casillas de radio deben anidarse dentro de un `div` con la clase `row`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert($('div.row:has(input[type="radio"])').length > 0);
|
assert($('div.row:has(input[type="radio"])').length > 0);
|
||||||
```
|
```
|
||||||
|
|
||||||
Each of your radio buttons should be nested inside its own `div` with the class `col-xs-6`.
|
Cada uno de tus botones de radio debe inscrustarse dentro un `div` con la clase `col-xs-6`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert($('div.col-xs-6:has(input[type="radio"])').length > 1);
|
assert($('div.col-xs-6:has(input[type="radio"])').length > 1);
|
||||||
```
|
```
|
||||||
|
|
||||||
All of your `div` elements should have closing tags.
|
Todos sus elementos `div` deben tener etiquetas de cierre.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(
|
assert(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
id: bad87fee1348cd8acef08811
|
id: bad87fee1348cd8acef08811
|
||||||
title: Taste the Bootstrap Button Color Rainbow
|
title: Prueba el arcoíris de colores del botón de Bootstrap
|
||||||
challengeType: 0
|
challengeType: 0
|
||||||
forumTopicId: 18323
|
forumTopicId: 18323
|
||||||
dashedName: taste-the-bootstrap-button-color-rainbow
|
dashedName: taste-the-bootstrap-button-color-rainbow
|
||||||
@ -8,27 +8,27 @@ dashedName: taste-the-bootstrap-button-color-rainbow
|
|||||||
|
|
||||||
# --description--
|
# --description--
|
||||||
|
|
||||||
The `btn-primary` class is the main color you'll use in your app. It is useful for highlighting actions you want your user to take.
|
La clase `btn-primary` es el color principal que usarás en tu aplicación. Es útil para resaltar las acciones que quieres que tome tu usuario.
|
||||||
|
|
||||||
Replace Bootstrap's `btn-default` class with `btn-primary` in your button.
|
Reemplaza la clase de Bootstrap `btn-default` con `btn-primary` en tu botón.
|
||||||
|
|
||||||
Note that this button will still need the `btn` and `btn-block` classes.
|
Ten en cuenta que este botón todavía necesitará las clases `btn` y `btn-block`.
|
||||||
|
|
||||||
# --hints--
|
# --hints--
|
||||||
|
|
||||||
Your button should have the class `btn-primary`.
|
Tu botón debe tener la clase `btn-primary`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert($('button').hasClass('btn-primary'));
|
assert($('button').hasClass('btn-primary'));
|
||||||
```
|
```
|
||||||
|
|
||||||
Your button should still have the `btn` and `btn-block` classes.
|
Tu botón debe tener las clases `btn` y `btn-block`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert($('button').hasClass('btn-block') && $('button').hasClass('btn'));
|
assert($('button').hasClass('btn-block') && $('button').hasClass('btn'));
|
||||||
```
|
```
|
||||||
|
|
||||||
All your `button` elements should have closing tags.
|
Todos tus elementos de tipo `button` deben tener etiquetas de cierre.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(
|
assert(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
id: bad87fee1348bd9aec908857
|
id: bad87fee1348bd9aec908857
|
||||||
title: Use Comments to Clarify Code
|
title: Use los comentarios para aclarar el código
|
||||||
challengeType: 0
|
challengeType: 0
|
||||||
forumTopicId: 18347
|
forumTopicId: 18347
|
||||||
dashedName: use-comments-to-clarify-code
|
dashedName: use-comments-to-clarify-code
|
||||||
@ -8,35 +8,35 @@ dashedName: use-comments-to-clarify-code
|
|||||||
|
|
||||||
# --description--
|
# --description--
|
||||||
|
|
||||||
When we start using jQuery, we will modify HTML elements without needing to actually change them in HTML.
|
Cuando comencemos a utilizar jQuery, modificaremos los elementos HTML sin necesidad de cambiarlos en HTML.
|
||||||
|
|
||||||
Let's make sure that everyone knows they shouldn't actually modify any of this code directly.
|
Asegurémonos de que todos sepan que en realidad no deben modificar nada de este código directamente.
|
||||||
|
|
||||||
Remember that you can start a comment with `<!--` and end a comment with `-->`
|
Recuerda que puedes comenzar un comentario con `<!--` y terminar con `-->`
|
||||||
|
|
||||||
Add a comment at the top of your HTML that says `Code below this line should not be changed`
|
Añade un comentario en la parte superior de tu HTML que diga `Code below this line should not be changed`
|
||||||
|
|
||||||
# --hints--
|
# --hints--
|
||||||
|
|
||||||
You should start a comment with `<!--` at the top of your HTML.
|
En la parte superior de tu HTML debe comenzar un comentario con `<!--`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(code.match(/^\s*<!--/));
|
assert(code.match(/^\s*<!--/));
|
||||||
```
|
```
|
||||||
|
|
||||||
Your comment should have the text `Code below this line should not be changed`.
|
El comentario debe contener el texto `Code below this line should not be changed`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(code.match(/<!--(?!(>|->|.*-->.*this line))\s*.*this line.*\s*-->/gi));
|
assert(code.match(/<!--(?!(>|->|.*-->.*this line))\s*.*this line.*\s*-->/gi));
|
||||||
```
|
```
|
||||||
|
|
||||||
You should close your comment with `-->`.
|
Debe cerrar el comentario con `-->`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(code.match(/-->.*\n+.+/g));
|
assert(code.match(/-->.*\n+.+/g));
|
||||||
```
|
```
|
||||||
|
|
||||||
You should have the same number of comment openers and closers.
|
Debe tener el mismo número de aperturas y cierres de comentario.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(code.match(/<!--/g).length === code.match(/-->/g).length);
|
assert(code.match(/<!--/g).length === code.match(/-->/g).length);
|
||||||
|
Reference in New Issue
Block a user