chore(i8n,curriculum): processed translations (#41551)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: a6b0bb188d873cb2c8729495
|
||||
title: Convert HTML Entities
|
||||
title: Convierte entidades HTML
|
||||
challengeType: 5
|
||||
forumTopicId: 16007
|
||||
dashedName: convert-html-entities
|
||||
@ -8,17 +8,17 @@ dashedName: convert-html-entities
|
||||
|
||||
# --description--
|
||||
|
||||
Convert the characters `&`, `<`, `>`, `"` (double quote), and `'` (apostrophe), in a string to their corresponding HTML entities.
|
||||
Convierte los caracteres `&`, `<`, `>`, `"` (dobles comillas), y `'` (apóstrofo), en un cadena con su correspondiente entidad HTML.
|
||||
|
||||
# --hints--
|
||||
|
||||
`convertHTML("Dolce & Gabbana")` should return `"Dolce & Gabbana"`.
|
||||
`convertHTML("Dolce & Gabbana")` debe devolver la cadena `Dolce & Gabbana`.
|
||||
|
||||
```js
|
||||
assert.match(convertHTML('Dolce & Gabbana'), /Dolce & Gabbana/);
|
||||
```
|
||||
|
||||
`convertHTML("Hamburgers < Pizza < Tacos")` should return `"Hamburgers < Pizza < Tacos"`.
|
||||
`convertHTML("Hamburgers < Pizza < Tacos")` debe devolver la cadena `Hamburgers < Pizza < Tacos`.
|
||||
|
||||
```js
|
||||
assert.match(
|
||||
@ -27,13 +27,13 @@ assert.match(
|
||||
);
|
||||
```
|
||||
|
||||
`convertHTML("Sixty > twelve")` should return `"Sixty > twelve"`.
|
||||
`convertHTML("Sixty > twelve")` debe devolver la cadena `Sixty > twelve`.
|
||||
|
||||
```js
|
||||
assert.match(convertHTML('Sixty > twelve'), /Sixty > twelve/);
|
||||
```
|
||||
|
||||
`convertHTML('Stuff in "quotation marks"')` should return `"Stuff in "quotation marks""`.
|
||||
`convertHTML('Stuff in "quotation marks"')` debe devolver la cadena `Stuff in "quotation marks"`.
|
||||
|
||||
```js
|
||||
assert.match(
|
||||
@ -42,19 +42,19 @@ assert.match(
|
||||
);
|
||||
```
|
||||
|
||||
`convertHTML("Schindler's List")` should return `"Schindler's List"`.
|
||||
`convertHTML("Schindler's List")` debe devolver la cadena `Schindler's List`.
|
||||
|
||||
```js
|
||||
assert.match(convertHTML("Schindler's List"), /Schindler's List/);
|
||||
```
|
||||
|
||||
`convertHTML("<>")` should return `"<>"`.
|
||||
`convertHTML("<>")` debe devolver la cadena `<>`.
|
||||
|
||||
```js
|
||||
assert.match(convertHTML('<>'), /<>/);
|
||||
```
|
||||
|
||||
`convertHTML("abc")` should return `"abc"`.
|
||||
`convertHTML("abc")` debe devolver la cadena `abc`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(convertHTML('abc'), 'abc');
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: a5de63ebea8dbee56860f4f2
|
||||
title: Diff Two Arrays
|
||||
title: Diferencia entre dos arreglos
|
||||
challengeType: 5
|
||||
forumTopicId: 16008
|
||||
dashedName: diff-two-arrays
|
||||
@ -8,20 +8,19 @@ dashedName: diff-two-arrays
|
||||
|
||||
# --description--
|
||||
|
||||
Compare two arrays and return a new array with any items only found in one of the two given arrays, but not both. In other words, return the symmetric difference of the two arrays.
|
||||
Compara dos arreglos y devuelve un nuevo arreglo con los elementos que sólo se encuentran en uno de los dos arreglos dados, pero no en ambos. En otras palabras, devuelve la diferencia simétrica de los dos arreglos.
|
||||
|
||||
**Note**
|
||||
You can return the array with its elements in any order.
|
||||
**Nota:**Puedes devolver el arreglo con sus elementos en cualquier orden.
|
||||
|
||||
# --hints--
|
||||
|
||||
`diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5])` should return an array.
|
||||
`diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5])` debe devolver un arreglo.
|
||||
|
||||
```js
|
||||
assert(typeof diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]) === 'object');
|
||||
```
|
||||
|
||||
`["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]` should return `["pink wool"]`.
|
||||
`["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]` debe devolver `["pink wool"]`.
|
||||
|
||||
```js
|
||||
assert.sameMembers(
|
||||
@ -33,7 +32,7 @@ assert.sameMembers(
|
||||
);
|
||||
```
|
||||
|
||||
`["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]` should return an array with one item.
|
||||
`["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]` debe devolver un arreglo con un elemento.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@ -44,7 +43,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
`["andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]` should return `["diorite", "pink wool"]`.
|
||||
`["andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]` debe devolver `["diorite", "pink wool"]`.
|
||||
|
||||
```js
|
||||
assert.sameMembers(
|
||||
@ -56,7 +55,7 @@ assert.sameMembers(
|
||||
);
|
||||
```
|
||||
|
||||
`["andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]` should return an array with two items.
|
||||
`["andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]` debe devolver un arreglo con dos elementos.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@ -67,7 +66,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
`["andesite", "grass", "dirt", "dead shrub"], ["andesite", "grass", "dirt", "dead shrub"]` should return `[]`.
|
||||
`["andesite", "grass", "dirt", "dead shrub"], ["andesite", "grass", "dirt", "dead shrub"]` debe devolver `[]`.
|
||||
|
||||
```js
|
||||
assert.sameMembers(
|
||||
@ -79,7 +78,7 @@ assert.sameMembers(
|
||||
);
|
||||
```
|
||||
|
||||
`["andesite", "grass", "dirt", "dead shrub"], ["andesite", "grass", "dirt", "dead shrub"]` should return an empty array.
|
||||
`["andesite", "grass", "dirt", "dead shrub"], ["andesite", "grass", "dirt", "dead shrub"]` debe devolver un arreglo vacío.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@ -90,19 +89,19 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
`[1, 2, 3, 5], [1, 2, 3, 4, 5]` should return `[4]`.
|
||||
`[1, 2, 3, 5], [1, 2, 3, 4, 5]` debe devolver `[4]`.
|
||||
|
||||
```js
|
||||
assert.sameMembers(diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]), [4]);
|
||||
```
|
||||
|
||||
`[1, 2, 3, 5], [1, 2, 3, 4, 5]` should return an array with one item.
|
||||
`[1, 2, 3, 5], [1, 2, 3, 4, 5]` debe devolver un arreglo con un elemento.
|
||||
|
||||
```js
|
||||
assert(diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]).length === 1);
|
||||
```
|
||||
|
||||
`[1, "calf", 3, "piglet"], [1, "calf", 3, 4]` should return `["piglet", 4]`.
|
||||
`[1, "calf", 3, "piglet"], [1, "calf", 3, 4]` debe devolver `["piglet", 4]`.
|
||||
|
||||
```js
|
||||
assert.sameMembers(diffArray([1, 'calf', 3, 'piglet'], [1, 'calf', 3, 4]), [
|
||||
@ -111,13 +110,13 @@ assert.sameMembers(diffArray([1, 'calf', 3, 'piglet'], [1, 'calf', 3, 4]), [
|
||||
]);
|
||||
```
|
||||
|
||||
`[1, "calf", 3, "piglet"], [1, "calf", 3, 4]` should return an array with two items.
|
||||
`[1, "calf", 3, "piglet"], [1, "calf", 3, 4]` debe devolver un arreglo con dos elementos.
|
||||
|
||||
```js
|
||||
assert(diffArray([1, 'calf', 3, 'piglet'], [1, 'calf', 3, 4]).length === 2);
|
||||
```
|
||||
|
||||
`[], ["snuffleupagus", "cookie monster", "elmo"]` should return `["snuffleupagus", "cookie monster", "elmo"]`.
|
||||
`[], ["snuffleupagus", "cookie monster", "elmo"]` debe devolver `["snuffleupagus", "cookie monster", "elmo"]`.
|
||||
|
||||
```js
|
||||
assert.sameMembers(diffArray([], ['snuffleupagus', 'cookie monster', 'elmo']), [
|
||||
@ -127,13 +126,13 @@ assert.sameMembers(diffArray([], ['snuffleupagus', 'cookie monster', 'elmo']), [
|
||||
]);
|
||||
```
|
||||
|
||||
`[], ["snuffleupagus", "cookie monster", "elmo"]` should return an array with three items.
|
||||
`[], ["snuffleupagus", "cookie monster", "elmo"]` debe devolver un arreglo con tres elementos.
|
||||
|
||||
```js
|
||||
assert(diffArray([], ['snuffleupagus', 'cookie monster', 'elmo']).length === 3);
|
||||
```
|
||||
|
||||
`[1, "calf", 3, "piglet"], [7, "filly"]` should return `[1, "calf", 3, "piglet", 7, "filly"]`.
|
||||
`[1, "calf", 3, "piglet"], [7, "filly"]` debe devolver `[1, "calf", 3, "piglet", 7, "filly"]`.
|
||||
|
||||
```js
|
||||
assert.sameMembers(diffArray([1, 'calf', 3, 'piglet'], [7, 'filly']), [
|
||||
@ -146,7 +145,7 @@ assert.sameMembers(diffArray([1, 'calf', 3, 'piglet'], [7, 'filly']), [
|
||||
]);
|
||||
```
|
||||
|
||||
`[1, "calf", 3, "piglet"], [7, "filly"]` should return an array with six items.
|
||||
`[1, "calf", 3, "piglet"], [7, "filly"]` debe devolver un arreglo con seis elementos.
|
||||
|
||||
```js
|
||||
assert(diffArray([1, 'calf', 3, 'piglet'], [7, 'filly']).length === 6);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: a5deed1811a43193f9f1c841
|
||||
title: Drop it
|
||||
title: Déjalo caer
|
||||
challengeType: 5
|
||||
forumTopicId: 16010
|
||||
dashedName: drop-it
|
||||
@ -8,13 +8,13 @@ dashedName: drop-it
|
||||
|
||||
# --description--
|
||||
|
||||
Given the array `arr`, iterate through and remove each element starting from the first element (the 0 index) until the function `func` returns `true` when the iterated element is passed through it.
|
||||
Dado el arreglo `arr`, itera y elimina cada elemento comenzando desde el primer elemento (el índice 0) hasta que la función `func` devuelva `true` cuando el elemento iterado se pasa a través de él.
|
||||
|
||||
Then return the rest of the array once the condition is satisfied, otherwise, `arr` should be returned as an empty array.
|
||||
Luego devuelve el resto del arreglo una vez que se cumpla la condición, de lo contrario, `arr` debe devolverse como un arreglo vacío.
|
||||
|
||||
# --hints--
|
||||
|
||||
`dropElements([1, 2, 3, 4], function(n) {return n >= 3;})` should return `[3, 4]`.
|
||||
`dropElements([1, 2, 3, 4], function(n) {return n >= 3;})` debe devolver `[3, 4]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(
|
||||
@ -25,7 +25,7 @@ assert.deepEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`dropElements([0, 1, 0, 1], function(n) {return n === 1;})` should return `[1, 0, 1]`.
|
||||
`dropElements([0, 1, 0, 1], function(n) {return n === 1;})` debe devolver `[1, 0, 1]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(
|
||||
@ -36,7 +36,7 @@ assert.deepEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`dropElements([1, 2, 3], function(n) {return n > 0;})` should return `[1, 2, 3]`.
|
||||
`dropElements([1, 2, 3], function(n) {return n > 0;})` debe devolver `[1, 2, 3]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(
|
||||
@ -47,7 +47,7 @@ assert.deepEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`dropElements([1, 2, 3, 4], function(n) {return n > 5;})` should return `[]`.
|
||||
`dropElements([1, 2, 3, 4], function(n) {return n > 5;})` debe devolver `[]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(
|
||||
@ -58,7 +58,7 @@ assert.deepEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`dropElements([1, 2, 3, 7, 4], function(n) {return n > 3;})` should return `[7, 4]`.
|
||||
`dropElements([1, 2, 3, 7, 4], function(n) {return n > 3;})` debe devolver `[7, 4]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(
|
||||
@ -69,7 +69,7 @@ assert.deepEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;})` should return `[3, 9, 2]`.
|
||||
`dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;})` debe devolver `[3, 9, 2]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: a10d2431ad0c6a099a4b8b52
|
||||
title: Everything Be True
|
||||
title: Todo sea verdad
|
||||
challengeType: 5
|
||||
forumTopicId: 16011
|
||||
dashedName: everything-be-true
|
||||
@ -8,17 +8,17 @@ dashedName: everything-be-true
|
||||
|
||||
# --description--
|
||||
|
||||
Check if the predicate (second argument) is <dfn>truthy</dfn> on all elements of a collection (first argument).
|
||||
Comprueba si el predicado (segundo argumento) es <dfn>truthy</dfn> en todos los elementos de una colección (primer argumento).
|
||||
|
||||
In other words, you are given an array collection of objects. The predicate `pre` will be an object property and you need to return `true` if its value is `truthy`. Otherwise, return `false`.
|
||||
En otras palabras, se te da una colección de arreglos de objetos. El predicado `pre` será una propiedad del objeto y debe devolver `true` si su valor es `truthy`. De lo contrario, devuelve `false`.
|
||||
|
||||
In JavaScript, `truthy` values are values that translate to `true` when evaluated in a Boolean context.
|
||||
En JavaScript, los valores `truthy` son valores que se traducen en `true` cuando se evalúan en un contexto booleano.
|
||||
|
||||
Remember, you can access object properties through either dot notation or `[]` notation.
|
||||
Recuerda, puedes acceder a las propiedades del objeto mediante la notación de puntos o la notación de corchetes `[]`.
|
||||
|
||||
# --hints--
|
||||
|
||||
`truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex")` should return true.
|
||||
`truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex")` debe devolver `true`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(
|
||||
@ -35,7 +35,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex")` should return false.
|
||||
`truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex")` debe devolver `false`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(
|
||||
@ -52,7 +52,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`truthCheck([{"user": "Tinky-Winky", "sex": "male", "age": 0}, {"user": "Dipsy", "sex": "male", "age": 3}, {"user": "Laa-Laa", "sex": "female", "age": 5}, {"user": "Po", "sex": "female", "age": 4}], "age")` should return false.
|
||||
`truthCheck([{"user": "Tinky-Winky", "sex": "male", "age": 0}, {"user": "Dipsy", "sex": "male", "age": 3}, {"user": "Laa-Laa", "sex": "female", "age": 5}, {"user": "Po", "sex": "female", "age": 4}], "age")` debe devolver `false`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(
|
||||
@ -69,7 +69,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`truthCheck([{"name": "Pete", "onBoat": true}, {"name": "Repeat", "onBoat": true}, {"name": "FastForward", "onBoat": null}], "onBoat")` should return false
|
||||
`truthCheck([{"name": "Pete", "onBoat": true}, {"name": "Repeat", "onBoat": true}, {"name": "FastForward", "onBoat": null}], "onBoat")` debe devolver `false`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(
|
||||
@ -85,7 +85,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`truthCheck([{"name": "Pete", "onBoat": true}, {"name": "Repeat", "onBoat": true, "alias": "Repete"}, {"name": "FastForward", "onBoat": true}], "onBoat")` should return true
|
||||
`truthCheck([{"name": "Pete", "onBoat": true}, {"name": "Repeat", "onBoat": true, "alias": "Repete"}, {"name": "FastForward", "onBoat": true}], "onBoat")` debe devolver `true`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(
|
||||
@ -101,13 +101,13 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`truthCheck([{"single": "yes"}], "single")` should return true
|
||||
`truthCheck([{"single": "yes"}], "single")` debe devolver `true`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(truthCheck([{ single: 'yes' }], 'single'), true);
|
||||
```
|
||||
|
||||
`truthCheck([{"single": ""}, {"single": "double"}], "single")` should return false
|
||||
`truthCheck([{"single": ""}, {"single": "double"}], "single")` debe devolver `false`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(
|
||||
@ -116,7 +116,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`truthCheck([{"single": "double"}, {"single": undefined}], "single")` should return false
|
||||
`truthCheck([{"single": "double"}, {"single": undefined}], "single")` debe devolver `false`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(
|
||||
@ -125,7 +125,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`truthCheck([{"single": "double"}, {"single": NaN}], "single")` should return false
|
||||
`truthCheck([{"single": "double"}, {"single": NaN}], "single")` debe devolver `false`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: a2f1d72d9b908d0bd72bb9f6
|
||||
title: Make a Person
|
||||
title: Crea una persona
|
||||
challengeType: 5
|
||||
forumTopicId: 16020
|
||||
dashedName: make-a-person
|
||||
@ -8,7 +8,7 @@ dashedName: make-a-person
|
||||
|
||||
# --description--
|
||||
|
||||
Fill in the object constructor with the following methods below:
|
||||
Completa el constructor de objetos con los siguientes métodos:
|
||||
|
||||
```js
|
||||
getFirstName()
|
||||
@ -19,53 +19,53 @@ setLastName(last)
|
||||
setFullName(firstAndLast)
|
||||
```
|
||||
|
||||
Run the tests to see the expected output for each method. The methods that take an argument must accept only one argument and it has to be a string. These methods must be the only available means of interacting with the object.
|
||||
Ejecuta las pruebas para ver el resultado esperado para cada método. Los métodos que toman un argumento deben aceptar sólo un argumento y tiene que ser una cadena. Estos métodos deben ser el único medio disponible para interactuar con el objeto.
|
||||
|
||||
# --hints--
|
||||
|
||||
`Object.keys(bob).length` should return 6.
|
||||
`Object.keys(bob).length` debe devolver 6.
|
||||
|
||||
```js
|
||||
assert.deepEqual(Object.keys(bob).length, 6);
|
||||
```
|
||||
|
||||
`bob instanceof Person` should return true.
|
||||
`bob instanceof Person` debe devolver `true`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(bob instanceof Person, true);
|
||||
```
|
||||
|
||||
`bob.firstName` should return undefined.
|
||||
`bob.firstName` debe devolver `undefined`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(bob.firstName, undefined);
|
||||
```
|
||||
|
||||
`bob.lastName` should return undefined.
|
||||
`bob.lastName` debe devolver `undefined`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(bob.lastName, undefined);
|
||||
```
|
||||
|
||||
`bob.getFirstName()` should return "Bob".
|
||||
`bob.getFirstName()` debe devolver la cadena `Bob`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(bob.getFirstName(), 'Bob');
|
||||
```
|
||||
|
||||
`bob.getLastName()` should return "Ross".
|
||||
`bob.getLastName()` debe devolver la cadena `Ross`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(bob.getLastName(), 'Ross');
|
||||
```
|
||||
|
||||
`bob.getFullName()` should return "Bob Ross".
|
||||
`bob.getFullName()` debe devolver la cadena `Bob Ross`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(bob.getFullName(), 'Bob Ross');
|
||||
```
|
||||
|
||||
`bob.getFullName()` should return "Haskell Ross" after `bob.setFirstName("Haskell")`.
|
||||
`bob.getFullName()` debe devolver la cadena `Haskell Ross` after `bob.setFirstName("Haskell")`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(
|
||||
@ -77,7 +77,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`bob.getFullName()` should return "Haskell Curry" after `bob.setLastName("Curry")`.
|
||||
`bob.getFullName()` debe devolver la cadena `Haskell Curry` después de `bob.setLastName("Curry")`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(
|
||||
@ -90,7 +90,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`bob.getFullName()` should return "Haskell Curry" after `bob.setFullName("Haskell Curry")`.
|
||||
`bob.getFullName()` debe devolver la cadena `Haskell Curry` después de `bob.setFullName("Haskell Curry")`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(
|
||||
@ -102,7 +102,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`bob.getFirstName()` should return "Haskell" after `bob.setFullName("Haskell Curry")`.
|
||||
`bob.getFirstName()` debe devolver la cadena `Haskell` después de `bob.setFullName("Haskell Curry")`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(
|
||||
@ -114,7 +114,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`bob.getLastName()` should return "Curry" after `bob.setFullName("Haskell Curry")`.
|
||||
`bob.getLastName()` debe devolver la cadena `Curry` después de `bob.setFullName("Haskell Curry")`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: af7588ade1100bde429baf20
|
||||
title: Missing letters
|
||||
title: Letras faltantes
|
||||
challengeType: 5
|
||||
forumTopicId: 16023
|
||||
dashedName: missing-letters
|
||||
@ -8,37 +8,37 @@ dashedName: missing-letters
|
||||
|
||||
# --description--
|
||||
|
||||
Find the missing letter in the passed letter range and return it.
|
||||
Encuentra la letra que falta en la siguiente cadena de letras y devuélvela.
|
||||
|
||||
If all letters are present in the range, return undefined.
|
||||
Si todas las letras están presentes en la cadena, devuelve `undefined`.
|
||||
|
||||
# --hints--
|
||||
|
||||
`fearNotLetter("abce")` should return "d".
|
||||
`fearNotLetter("abce")` debe devolver la cadena `d`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(fearNotLetter('abce'), 'd');
|
||||
```
|
||||
|
||||
`fearNotLetter("abcdefghjklmno")` should return "i".
|
||||
`fearNotLetter("abcdefghjklmno")` debe devolver la cadena `i`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(fearNotLetter('abcdefghjklmno'), 'i');
|
||||
```
|
||||
|
||||
`fearNotLetter("stvwx")` should return "u".
|
||||
`fearNotLetter("stvwx")` debe devolver la cadena `u`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(fearNotLetter('stvwx'), 'u');
|
||||
```
|
||||
|
||||
`fearNotLetter("bcdf")` should return "e".
|
||||
`fearNotLetter("bcdf")` debe devolver la cadena `e`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(fearNotLetter('bcdf'), 'e');
|
||||
```
|
||||
|
||||
`fearNotLetter("abcdefghijklmnopqrstuvwxyz")` should return undefined.
|
||||
`fearNotLetter("abcdefghijklmnopqrstuvwxyz")` debe devolver `undefined`.
|
||||
|
||||
```js
|
||||
assert.isUndefined(fearNotLetter('abcdefghijklmnopqrstuvwxyz'));
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: aa7697ea2477d1316795783b
|
||||
title: Pig Latin
|
||||
title: Pig Latin (Latin de los cerdos)
|
||||
challengeType: 5
|
||||
forumTopicId: 16039
|
||||
dashedName: pig-latin
|
||||
@ -8,55 +8,55 @@ dashedName: pig-latin
|
||||
|
||||
# --description--
|
||||
|
||||
Pig Latin is a way of altering English Words. The rules are as follows:
|
||||
Pig Latin (latin de los cerdos) es una manera de alterar las palabras en inglés. Las normas son las siguientes:
|
||||
|
||||
\- If a word begins with a consonant, take the first consonant or consonant cluster, move it to the end of the word, and add "ay" to it.
|
||||
\- Si una palabra comienza con una consonante, toma la primer consonante o grupo de consonantes, muévela al final de la palabra, y añade `ay` a ella.
|
||||
|
||||
\- If a word begins with a vowel, just add "way" at the end.
|
||||
\- Si una palabra comienza con una vocal, solo añade `way` al final.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Translate the provided string to Pig Latin. Input strings are guaranteed to be English words in all lowercase.
|
||||
Traduce la cadena proporcionada a Pig Latin. Las cadenas de entrada están garantizadas como palabras en inglés en minúsculas.
|
||||
|
||||
# --hints--
|
||||
|
||||
`translatePigLatin("california")` should return "aliforniacay".
|
||||
`translatePigLatin("california")` debe devolver la cadena `aliforniacay`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(translatePigLatin('california'), 'aliforniacay');
|
||||
```
|
||||
|
||||
`translatePigLatin("paragraphs")` should return "aragraphspay".
|
||||
`translatePigLatin("paragraphs")` debe devolver la cadena `aragraphspay`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(translatePigLatin('paragraphs'), 'aragraphspay');
|
||||
```
|
||||
|
||||
`translatePigLatin("glove")` should return "oveglay".
|
||||
`translatePigLatin("glove")` debe devolver la cadena `oveglay`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(translatePigLatin('glove'), 'oveglay');
|
||||
```
|
||||
|
||||
`translatePigLatin("algorithm")` should return "algorithmway".
|
||||
`translatePigLatin("algorithm")` debe devolver la cadena `algorithmway`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(translatePigLatin('algorithm'), 'algorithmway');
|
||||
```
|
||||
|
||||
`translatePigLatin("eight")` should return "eightway".
|
||||
`translatePigLatin("eight")` debe devolver la cadena `eightway`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(translatePigLatin('eight'), 'eightway');
|
||||
```
|
||||
|
||||
Should handle words where the first vowel comes in the middle of the word. `translatePigLatin("schwartz")` should return "artzschway".
|
||||
Debes manejar las palabras en donde la primera vocal viene en el centro de la palabra. `translatePigLatin("schwartz")` debe devolver la cadena `artzschway`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(translatePigLatin('schwartz'), 'artzschway');
|
||||
```
|
||||
|
||||
Should handle words without vowels. `translatePigLatin("rhythm")` should return "rhythmay".
|
||||
Debes manejar las palabras sin vocales. `translatePigLatin("rhythm")` debe devolver la cadena `rhythmay`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(translatePigLatin('rhythm'), 'rhythmay');
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: a0b5010f579e69b815e7c5d6
|
||||
title: Search and Replace
|
||||
title: Busca y reemplaza
|
||||
challengeType: 5
|
||||
forumTopicId: 16045
|
||||
dashedName: search-and-replace
|
||||
@ -8,20 +8,19 @@ dashedName: search-and-replace
|
||||
|
||||
# --description--
|
||||
|
||||
Perform a search and replace on the sentence using the arguments provided and return the new sentence.
|
||||
Realiza una búsqueda y reemplaza en la oración usando los argumentos proporcionados y devuelve la nueva oración.
|
||||
|
||||
First argument is the sentence to perform the search and replace on.
|
||||
El primer argumento es la frase sobre la que se va a realizar la búsqueda y el reemplazo.
|
||||
|
||||
Second argument is the word that you will be replacing (before).
|
||||
El segundo argumento es la palabra que se reemplazará (antes).
|
||||
|
||||
Third argument is what you will be replacing the second argument with (after).
|
||||
El tercer argumento es lo que reemplazará el segundo argumento (después).
|
||||
|
||||
**Note**
|
||||
Preserve the case of the first character in the original word when you are replacing it. For example if you mean to replace the word "Book" with the word "dog", it should be replaced as "Dog"
|
||||
**Note:** Mantén la capitalización del primer carácter en la palabra original cuando lo estés reemplazando. Por ejemplo, si quieres reemplazar la palabra `Book` por la palabra `dog`, debe ser reemplazada como `Dog`
|
||||
|
||||
# --hints--
|
||||
|
||||
`myReplace("Let us go to the store", "store", "mall")` should return "Let us go to the mall".
|
||||
`myReplace("Let us go to the store", "store", "mall")` debe devolver la cadena `Let us go to the mall`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(
|
||||
@ -30,7 +29,7 @@ assert.deepEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`myReplace("He is Sleeping on the couch", "Sleeping", "sitting")` should return "He is Sitting on the couch".
|
||||
`myReplace("He is Sleeping on the couch", "Sleeping", "sitting")` debe devolver la cadena `He is Sitting on the couch`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(
|
||||
@ -39,7 +38,7 @@ assert.deepEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`myReplace("I think we should look up there", "up", "Down")` should return "I think we should look down there".
|
||||
`myReplace("I think we should look up there", "up", "Down")` debe devolver la cadena `I think we should look down there`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(
|
||||
@ -48,7 +47,7 @@ assert.deepEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`myReplace("This has a spellngi error", "spellngi", "spelling")` should return "This has a spelling error".
|
||||
`myReplace("This has a spellngi error", "spellngi", "spelling")` debe devolver la cadena `This has a spelling error`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(
|
||||
@ -57,7 +56,7 @@ assert.deepEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`myReplace("His name is Tom", "Tom", "john")` should return "His name is John".
|
||||
`myReplace("His name is Tom", "Tom", "john")` debe devolver la cadena `His name is John`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(
|
||||
@ -66,7 +65,7 @@ assert.deepEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`myReplace("Let us get back to more Coding", "Coding", "algorithms")` should return "Let us get back to more Algorithms".
|
||||
`myReplace("Let us get back to more Coding", "Coding", "algorithms")` debe devolver la cadena `Let us get back to more Algorithms`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: a39963a4c10bc8b4d4f06d7e
|
||||
title: Seek and Destroy
|
||||
title: Busca y destruye
|
||||
challengeType: 5
|
||||
forumTopicId: 16046
|
||||
dashedName: seek-and-destroy
|
||||
@ -8,38 +8,37 @@ dashedName: seek-and-destroy
|
||||
|
||||
# --description--
|
||||
|
||||
You will be provided with an initial array (the first argument in the destroyer function), followed by one or more arguments. Remove all elements from the initial array that are of the same value as these arguments.
|
||||
Se proporcionará un arreglo inicial (el primer argumento en la función `destroyer`), seguido de uno o más argumentos. Elimina todos los elementos del arreglo inicial que tengan el mismo valor que estos argumentos.
|
||||
|
||||
**Note**
|
||||
You have to use the `arguments` object.
|
||||
**Nota:** Tienes que utilizar el objeto `arguments`.
|
||||
|
||||
# --hints--
|
||||
|
||||
`destroyer([1, 2, 3, 1, 2, 3], 2, 3)` should return `[1, 1]`.
|
||||
`destroyer([1, 2, 3, 1, 2, 3], 2, 3)` debe devolver `[1, 1]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(destroyer([1, 2, 3, 1, 2, 3], 2, 3), [1, 1]);
|
||||
```
|
||||
|
||||
`destroyer([1, 2, 3, 5, 1, 2, 3], 2, 3)` should return `[1, 5, 1]`.
|
||||
`destroyer([1, 2, 3, 5, 1, 2, 3], 2, 3)` debe devolver `[1, 5, 1]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(destroyer([1, 2, 3, 5, 1, 2, 3], 2, 3), [1, 5, 1]);
|
||||
```
|
||||
|
||||
`destroyer([3, 5, 1, 2, 2], 2, 3, 5)` should return `[1]`.
|
||||
`destroyer([3, 5, 1, 2, 2], 2, 3, 5)` debe devolver `[1]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(destroyer([3, 5, 1, 2, 2], 2, 3, 5), [1]);
|
||||
```
|
||||
|
||||
`destroyer([2, 3, 2, 3], 2, 3)` should return `[]`.
|
||||
`destroyer([2, 3, 2, 3], 2, 3)` debe devolver `[]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(destroyer([2, 3, 2, 3], 2, 3), []);
|
||||
```
|
||||
|
||||
`destroyer(["tree", "hamburger", 53], "tree", 53)` should return `["hamburger"]`.
|
||||
`destroyer(["tree", "hamburger", 53], "tree", 53)` debe devolver `["hamburger"]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(destroyer(['tree', 'hamburger', 53], 'tree', 53), [
|
||||
@ -47,7 +46,7 @@ assert.deepEqual(destroyer(['tree', 'hamburger', 53], 'tree', 53), [
|
||||
]);
|
||||
```
|
||||
|
||||
`destroyer(["possum", "trollo", 12, "safari", "hotdog", 92, 65, "grandma", "bugati", "trojan", "yacht"], "yacht", "possum", "trollo", "safari", "hotdog", "grandma", "bugati", "trojan")` should return `[12,92,65]`.
|
||||
`destroyer(["possum", "trollo", 12, "safari", "hotdog", 92, 65, "grandma", "bugati", "trojan", "yacht"], "yacht", "possum", "trollo", "safari", "hotdog", "grandma", "bugati", "trojan")` debe devolver `[12,92,65]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: ae9defd7acaf69703ab432ea
|
||||
title: Smallest Common Multiple
|
||||
title: Múltiplo común más pequeño
|
||||
challengeType: 5
|
||||
forumTopicId: 16075
|
||||
dashedName: smallest-common-multiple
|
||||
@ -8,45 +8,45 @@ dashedName: smallest-common-multiple
|
||||
|
||||
# --description--
|
||||
|
||||
Find the smallest common multiple of the provided parameters that can be evenly divided by both, as well as by all sequential numbers in the range between these parameters.
|
||||
Encuentra el múltiplo común más pequeño de los parámetros proporcionados que pueden dividirse equitativamente por ambos, así como por todos los números consecutivos del rango entre estos parámetros.
|
||||
|
||||
The range will be an array of two numbers that will not necessarily be in numerical order.
|
||||
El rango será un arreglo de dos números que no necesariamente estarán en orden numérico.
|
||||
|
||||
For example, if given 1 and 3, find the smallest common multiple of both 1 and 3 that is also evenly divisible by all numbers *between* 1 and 3. The answer here would be 6.
|
||||
Por ejemplo, si se dan 1 y 3, encuentra el múltiplo común más pequeño de 1 y 3 que también es dividido por todos los números *entre* 1 y 3. La respuesta sería 6.
|
||||
|
||||
# --hints--
|
||||
|
||||
`smallestCommons([1, 5])` should return a number.
|
||||
`smallestCommons([1, 5])` debe devolver un número.
|
||||
|
||||
```js
|
||||
assert.deepEqual(typeof smallestCommons([1, 5]), 'number');
|
||||
```
|
||||
|
||||
`smallestCommons([1, 5])` should return 60.
|
||||
`smallestCommons([1, 5])` debe devolver 60.
|
||||
|
||||
```js
|
||||
assert.deepEqual(smallestCommons([1, 5]), 60);
|
||||
```
|
||||
|
||||
`smallestCommons([5, 1])` should return 60.
|
||||
`smallestCommons([5, 1])` debe devolver 60.
|
||||
|
||||
```js
|
||||
assert.deepEqual(smallestCommons([5, 1]), 60);
|
||||
```
|
||||
|
||||
`smallestCommons([2, 10])` should return 2520.
|
||||
`smallestCommons([2, 10])` debe devolver 2520.
|
||||
|
||||
```js
|
||||
assert.deepEqual(smallestCommons([2, 10]), 2520);
|
||||
```
|
||||
|
||||
`smallestCommons([1, 13])` should return 360360.
|
||||
`smallestCommons([1, 13])` debe devolver 360360.
|
||||
|
||||
```js
|
||||
assert.deepEqual(smallestCommons([1, 13]), 360360);
|
||||
```
|
||||
|
||||
`smallestCommons([23, 18])` should return 6056820.
|
||||
`smallestCommons([23, 18])` debe devolver 6056820.
|
||||
|
||||
```js
|
||||
assert.deepEqual(smallestCommons([23, 18]), 6056820);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: a105e963526e7de52b219be9
|
||||
title: Sorted Union
|
||||
title: Unión ordenada
|
||||
challengeType: 5
|
||||
forumTopicId: 16077
|
||||
dashedName: sorted-union
|
||||
@ -8,29 +8,29 @@ dashedName: sorted-union
|
||||
|
||||
# --description--
|
||||
|
||||
Write a function that takes two or more arrays and returns a new array of unique values in the order of the original provided arrays.
|
||||
Escribe una función que tome dos o más arreglos y devuelve un nuevo arreglo de valores únicos manteniendo el orden original de los arreglos proporcionados.
|
||||
|
||||
In other words, all values present from all arrays should be included in their original order, but with no duplicates in the final array.
|
||||
En otras palabras, todos los valores presentes de todos los arreglos deben incluirse en su orden original, pero sin duplicados en el arreglo final.
|
||||
|
||||
The unique numbers should be sorted by their original order, but the final array should not be sorted in numerical order.
|
||||
Los números únicos deben ser ordenados según su orden original, pero el arreglo final no debe ordenarse según el orden numérico.
|
||||
|
||||
Check the assertion tests for examples.
|
||||
Revisa las pruebas de afirmación para ver ejemplos.
|
||||
|
||||
# --hints--
|
||||
|
||||
`uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1])` should return `[1, 3, 2, 5, 4]`.
|
||||
`uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1])` debe devolver `[1, 3, 2, 5, 4]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]), [1, 3, 2, 5, 4]);
|
||||
```
|
||||
|
||||
`uniteUnique([1, 2, 3], [5, 2, 1])` should return `[1, 2, 3, 5]`.
|
||||
`uniteUnique([1, 2, 3], [5, 2, 1])` debe devolver `[1, 2, 3, 5]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(uniteUnique([1, 2, 3], [5, 2, 1]), [1, 2, 3, 5]);
|
||||
```
|
||||
|
||||
`uniteUnique([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8])` should return `[1, 2, 3, 5, 4, 6, 7, 8]`.
|
||||
`uniteUnique([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8])` debe devolver `[1, 2, 3, 5, 4, 6, 7, 8]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(uniteUnique([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8]), [
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: a103376db3ba46b2d50db289
|
||||
title: Spinal Tap Case
|
||||
title: Spinal case
|
||||
challengeType: 5
|
||||
forumTopicId: 16078
|
||||
dashedName: spinal-tap-case
|
||||
@ -8,23 +8,23 @@ dashedName: spinal-tap-case
|
||||
|
||||
# --description--
|
||||
|
||||
Convert a string to spinal case. Spinal case is all-lowercase-words-joined-by-dashes.
|
||||
Convierte una cadena a spinal case. Spinal case significa todas-las-palabras-en-minúscula-unidas-por-guiones.
|
||||
|
||||
# --hints--
|
||||
|
||||
`spinalCase("This Is Spinal Tap")` should return `"this-is-spinal-tap"`.
|
||||
`spinalCase("This Is Spinal Tap")` debe devolver la cadena `this-is-spinal-tap`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(spinalCase('This Is Spinal Tap'), 'this-is-spinal-tap');
|
||||
```
|
||||
|
||||
`spinalCase("thisIsSpinalTap")` should return `"this-is-spinal-tap"`.
|
||||
`spinalCase("thisIsSpinalTap")` debe devolver la cadena `this-is-spinal-tap`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(spinalCase('thisIsSpinalTap'), 'this-is-spinal-tap');
|
||||
```
|
||||
|
||||
`spinalCase("The_Andy_Griffith_Show")` should return `"the-andy-griffith-show"`.
|
||||
`spinalCase("The_Andy_Griffith_Show")` debe devolver la cadena `the-andy-griffith-show`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(
|
||||
@ -33,7 +33,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`spinalCase("Teletubbies say Eh-oh")` should return `"teletubbies-say-eh-oh"`.
|
||||
`spinalCase("Teletubbies say Eh-oh")` debe devolver la cadena `teletubbies-say-eh-oh`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(
|
||||
@ -42,7 +42,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`spinalCase("AllThe-small Things")` should return `"all-the-small-things"`.
|
||||
`spinalCase("AllThe-small Things")` debe devolver la cadena `all-the-small-things`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(spinalCase('AllThe-small Things'), 'all-the-small-things');
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: ab306dbdcc907c7ddfc30830
|
||||
title: Steamroller
|
||||
title: Aplanadora
|
||||
challengeType: 5
|
||||
forumTopicId: 16079
|
||||
dashedName: steamroller
|
||||
@ -8,35 +8,35 @@ dashedName: steamroller
|
||||
|
||||
# --description--
|
||||
|
||||
Flatten a nested array. You must account for varying levels of nesting.
|
||||
Aplana un arreglo anidado. Debes tener en cuenta los diferentes niveles de anidación.
|
||||
|
||||
# --hints--
|
||||
|
||||
`steamrollArray([[["a"]], [["b"]]])` should return `["a", "b"]`.
|
||||
`steamrollArray([[["a"]], [["b"]]])` debe devolver `["a", "b"]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(steamrollArray([[['a']], [['b']]]), ['a', 'b']);
|
||||
```
|
||||
|
||||
`steamrollArray([1, [2], [3, [[4]]]])` should return `[1, 2, 3, 4]`.
|
||||
`steamrollArray([1, [2], [3, [[4]]]])` debe devolver `[1, 2, 3, 4]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(steamrollArray([1, [2], [3, [[4]]]]), [1, 2, 3, 4]);
|
||||
```
|
||||
|
||||
`steamrollArray([1, [], [3, [[4]]]])` should return `[1, 3, 4]`.
|
||||
`steamrollArray([1, [], [3, [[4]]]])` debe devolver `[1, 3, 4]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(steamrollArray([1, [], [3, [[4]]]]), [1, 3, 4]);
|
||||
```
|
||||
|
||||
`steamrollArray([1, {}, [3, [[4]]]])` should return `[1, {}, 3, 4]`.
|
||||
`steamrollArray([1, {}, [3, [[4]]]])` debe devolver `[1, {}, 3, 4]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(steamrollArray([1, {}, [3, [[4]]]]), [1, {}, 3, 4]);
|
||||
```
|
||||
|
||||
Your solution should not use the `Array.prototype.flat()` or `Array.prototype.flatMap()` methods.
|
||||
Tu solución no debe utilizar los métodos `Array.prototype.flat()` o `Array.prototype.flatMap()`.
|
||||
|
||||
```js
|
||||
assert(!code.match(/\.\s*flat\s*\(/) && !code.match(/\.\s*flatMap\s*\(/));
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: a3566b1109230028080c9345
|
||||
title: Sum All Numbers in a Range
|
||||
title: Suma todos los números en un rango
|
||||
challengeType: 5
|
||||
forumTopicId: 16083
|
||||
dashedName: sum-all-numbers-in-a-range
|
||||
@ -8,37 +8,37 @@ dashedName: sum-all-numbers-in-a-range
|
||||
|
||||
# --description--
|
||||
|
||||
We'll pass you an array of two numbers. Return the sum of those two numbers plus the sum of all the numbers between them. The lowest number will not always come first.
|
||||
Te pasaremos un arreglo de dos números. Devuelve la suma de estos dos números más la suma de todos los números entre ellos. El número más bajo no siempre será el primero.
|
||||
|
||||
For example, `sumAll([4,1])` should return `10` because sum of all the numbers between 1 and 4 (both inclusive) is `10`.
|
||||
Por ejemplo, `sumAll([4,1])`> debe devolver `10` porque la suma de todos los números entre 1 y 4 (ambos incluidos) es `10`.
|
||||
|
||||
# --hints--
|
||||
|
||||
`sumAll([1, 4])` should return a number.
|
||||
`sumAll([1, 4])` debe devolver un número.
|
||||
|
||||
```js
|
||||
assert(typeof sumAll([1, 4]) === 'number');
|
||||
```
|
||||
|
||||
`sumAll([1, 4])` should return 10.
|
||||
`sumAll([1, 4])` debe devolver 10.
|
||||
|
||||
```js
|
||||
assert.deepEqual(sumAll([1, 4]), 10);
|
||||
```
|
||||
|
||||
`sumAll([4, 1])` should return 10.
|
||||
`sumAll([4, 1])` debe devolver 10.
|
||||
|
||||
```js
|
||||
assert.deepEqual(sumAll([4, 1]), 10);
|
||||
```
|
||||
|
||||
`sumAll([5, 10])` should return 45.
|
||||
`sumAll([5, 10])` debe devolver 45.
|
||||
|
||||
```js
|
||||
assert.deepEqual(sumAll([5, 10]), 45);
|
||||
```
|
||||
|
||||
`sumAll([10, 5])` should return 45.
|
||||
`sumAll([10, 5])` debería devolver 45.
|
||||
|
||||
```js
|
||||
assert.deepEqual(sumAll([10, 5]), 45);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: a5229172f011153519423690
|
||||
title: Sum All Odd Fibonacci Numbers
|
||||
title: Suma todos los números impares de Fibonacci
|
||||
challengeType: 5
|
||||
forumTopicId: 16084
|
||||
dashedName: sum-all-odd-fibonacci-numbers
|
||||
@ -8,45 +8,45 @@ dashedName: sum-all-odd-fibonacci-numbers
|
||||
|
||||
# --description--
|
||||
|
||||
Given a positive integer `num`, return the sum of all odd Fibonacci numbers that are less than or equal to `num`.
|
||||
Dado un entero positivo `num`, devuelve la suma de todos los números impares de Fibonacci que son menores o iguales a `num`.
|
||||
|
||||
The first two numbers in the Fibonacci sequence are 1 and 1. Every additional number in the sequence is the sum of the two previous numbers. The first six numbers of the Fibonacci sequence are 1, 1, 2, 3, 5 and 8.
|
||||
Los dos primeros números en la secuencia de Fibonacci son 1 y 1. Cada número adicional en la secuencia es la suma de los dos números anteriores. Los seis primeros números de la secuencia de Fibonacci son 1, 1, 2, 3, 5 y 8.
|
||||
|
||||
For example, `sumFibs(10)` should return `10` because all odd Fibonacci numbers less than or equal to `10` are 1, 1, 3, and 5.
|
||||
Por ejemplo, `sumFibs(10)` debe devolver `10` porque todos los números impares de Fibonacci menores o iguales a `10` son 1, 1, 3 y 5.
|
||||
|
||||
# --hints--
|
||||
|
||||
`sumFibs(1)` should return a number.
|
||||
`sumFibs(1)` debe devolver un número.
|
||||
|
||||
```js
|
||||
assert(typeof sumFibs(1) === 'number');
|
||||
```
|
||||
|
||||
`sumFibs(1000)` should return 1785.
|
||||
`sumFibs(1000)` debe devolver 1785.
|
||||
|
||||
```js
|
||||
assert(sumFibs(1000) === 1785);
|
||||
```
|
||||
|
||||
`sumFibs(4000000)` should return 4613732.
|
||||
`sumFibs(4000000)` debe devolver 4613732.
|
||||
|
||||
```js
|
||||
assert(sumFibs(4000000) === 4613732);
|
||||
```
|
||||
|
||||
`sumFibs(4)` should return 5.
|
||||
`sumFibs(4)` debe devolver 5.
|
||||
|
||||
```js
|
||||
assert(sumFibs(4) === 5);
|
||||
```
|
||||
|
||||
`sumFibs(75024)` should return 60696.
|
||||
`sumFibs(75024)` debe devolver 60696.
|
||||
|
||||
```js
|
||||
assert(sumFibs(75024) === 60696);
|
||||
```
|
||||
|
||||
`sumFibs(75025)` should return 135721.
|
||||
`sumFibs(75025)` debe devolver 135721.
|
||||
|
||||
```js
|
||||
assert(sumFibs(75025) === 135721);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: a3bfc1673c0526e06d3ac698
|
||||
title: Sum All Primes
|
||||
title: Suma todos los números primos
|
||||
challengeType: 5
|
||||
forumTopicId: 16085
|
||||
dashedName: sum-all-primes
|
||||
@ -8,25 +8,25 @@ dashedName: sum-all-primes
|
||||
|
||||
# --description--
|
||||
|
||||
A <dfn>prime number</dfn> is a whole number greater than 1 with exactly two divisors: 1 and itself. For example, 2 is a prime number because it is only divisible by 1 and 2. In contrast, 4 is not prime since it is divisible by 1, 2 and 4.
|
||||
Un <dfn>número primo</dfn> es un número entero mayor que 1 con sólo dos divisores: 1 y el propio número. Por ejemplo, 2 es un número primo porque sólo es divisible entre 1 y 2. Por el contrario, 4 no es primo ya que es divisible entre 1, 2 y 4.
|
||||
|
||||
Rewrite `sumPrimes` so it returns the sum of all prime numbers that are less than or equal to num.
|
||||
Reescribe `sumPrimes` para que devuelva la suma de todos los números primos que sean menores o iguales a num.
|
||||
|
||||
# --hints--
|
||||
|
||||
`sumPrimes(10)` should return a number.
|
||||
`sumPrimes(10)` debe devolver un número.
|
||||
|
||||
```js
|
||||
assert.deepEqual(typeof sumPrimes(10), 'number');
|
||||
```
|
||||
|
||||
`sumPrimes(10)` should return 17.
|
||||
`sumPrimes(10)` debe devolver 17.
|
||||
|
||||
```js
|
||||
assert.deepEqual(sumPrimes(10), 17);
|
||||
```
|
||||
|
||||
`sumPrimes(977)` should return 73156.
|
||||
`sumPrimes(977)` debe devolver 73156.
|
||||
|
||||
```js
|
||||
assert.deepEqual(sumPrimes(977), 73156);
|
||||
|
Reference in New Issue
Block a user