diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md index dbedb68997a..96a6faba979 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md @@ -28,7 +28,23 @@ const _callback = item => item * 2; assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); ``` -يجب ألا يستخدم الكود الخاص بك دالة `map`. +`["naomi", "quincy", "camperbot"].myMap(element => element.toUpperCase())` should return `["NAOMI", "QUINCY", "CAMPERBOT"]`. + +```js +const _test_s = ["naomi", "quincy", "camperbot"]; +const _callback = element => element.toUpperCase(); +assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); +``` + +`[1, 1, 2, 5, 2].myMap((element, index, array) => array[i + 1] || array[0])` should return `[1, 2, 5, 2, 1]`. + +```js +const _test_s = [1, 1, 2, 5, 2]; +const _callback = (element, index, array) => array[index + 1] || array[0]; +assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); +``` + +Your code should not use the `map` method. ```js assert(!code.match(/\.?[\s\S]*?map/g)); @@ -53,8 +69,8 @@ Array.prototype.myMap = function(callback) { ```js Array.prototype.myMap = function(callback) { const newArray = []; - for (const elem of this) { - newArray.push(callback(elem)); + for (let i = 0; i < this.length; i++) { + newArray.push(callback(this[i], i, this)); } return newArray; }; diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md index 8cbdb33d732..f1c172be6d8 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md @@ -24,7 +24,23 @@ const _callback = item => item % 2; assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); ``` -يجب ألا يستخدم الكود الخاص بك دالة `filter`. +`["naomi", "quincy", "camperbot"].myFilter(element => element === "naomi")` should return `["naomi"]`. + +```js +const _test_s = ["naomi", "quincy", "camperbot"]; +const _callback = element => element === "naomi"; +assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); +``` + +`[1, 1, 2, 5, 2].myFilter((element, index, array) => array.indexOf(element) === index)` should return `[1, 2, 5]`. + +```js +const _test_s = [1, 1, 2, 5, 2]; +const _callback = (element, index, array) => array.indexOf(element) === index; +assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); +``` + +Your code should not use the `filter` method. ```js assert(!code.match(/\.?[\s\S]*?filter/g)); @@ -50,7 +66,7 @@ Array.prototype.myFilter = function(callback) { Array.prototype.myFilter = function(callback) { const newArray = []; for (let i = 0; i < this.length; i++) { - if (callback(this[i])) newArray.push(this[i]); + if (callback(this[i], i, this)) newArray.push(this[i]); } return newArray; }; diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md index baea02a3a92..9c2812b0520 100644 --- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md +++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md @@ -28,7 +28,23 @@ const _callback = item => item * 2; assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); ``` -不能使用 `map` 方法。 +`["naomi", "quincy", "camperbot"].myMap(element => element.toUpperCase())` should return `["NAOMI", "QUINCY", "CAMPERBOT"]`. + +```js +const _test_s = ["naomi", "quincy", "camperbot"]; +const _callback = element => element.toUpperCase(); +assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); +``` + +`[1, 1, 2, 5, 2].myMap((element, index, array) => array[i + 1] || array[0])` should return `[1, 2, 5, 2, 1]`. + +```js +const _test_s = [1, 1, 2, 5, 2]; +const _callback = (element, index, array) => array[index + 1] || array[0]; +assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); +``` + +Your code should not use the `map` method. ```js assert(!code.match(/\.?[\s\S]*?map/g)); @@ -53,8 +69,8 @@ Array.prototype.myMap = function(callback) { ```js Array.prototype.myMap = function(callback) { const newArray = []; - for (const elem of this) { - newArray.push(callback(elem)); + for (let i = 0; i < this.length; i++) { + newArray.push(callback(this[i], i, this)); } return newArray; }; diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md index a8357cac9ee..70887e53bc1 100644 --- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md +++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md @@ -24,7 +24,23 @@ const _callback = item => item % 2; assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); ``` -不應該使用 `filter` 方法。 +`["naomi", "quincy", "camperbot"].myFilter(element => element === "naomi")` should return `["naomi"]`. + +```js +const _test_s = ["naomi", "quincy", "camperbot"]; +const _callback = element => element === "naomi"; +assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); +``` + +`[1, 1, 2, 5, 2].myFilter((element, index, array) => array.indexOf(element) === index)` should return `[1, 2, 5]`. + +```js +const _test_s = [1, 1, 2, 5, 2]; +const _callback = (element, index, array) => array.indexOf(element) === index; +assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); +``` + +Your code should not use the `filter` method. ```js assert(!code.match(/\.?[\s\S]*?filter/g)); @@ -50,7 +66,7 @@ Array.prototype.myFilter = function(callback) { Array.prototype.myFilter = function(callback) { const newArray = []; for (let i = 0; i < this.length; i++) { - if (callback(this[i])) newArray.push(this[i]); + if (callback(this[i], i, this)) newArray.push(this[i]); } return newArray; }; diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md index b8a695e4f2c..93d338d3d19 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md @@ -28,7 +28,23 @@ const _callback = item => item * 2; assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); ``` -不能使用 `map` 方法。 +`["naomi", "quincy", "camperbot"].myMap(element => element.toUpperCase())` should return `["NAOMI", "QUINCY", "CAMPERBOT"]`. + +```js +const _test_s = ["naomi", "quincy", "camperbot"]; +const _callback = element => element.toUpperCase(); +assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); +``` + +`[1, 1, 2, 5, 2].myMap((element, index, array) => array[i + 1] || array[0])` should return `[1, 2, 5, 2, 1]`. + +```js +const _test_s = [1, 1, 2, 5, 2]; +const _callback = (element, index, array) => array[index + 1] || array[0]; +assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); +``` + +Your code should not use the `map` method. ```js assert(!code.match(/\.?[\s\S]*?map/g)); @@ -53,8 +69,8 @@ Array.prototype.myMap = function(callback) { ```js Array.prototype.myMap = function(callback) { const newArray = []; - for (const elem of this) { - newArray.push(callback(elem)); + for (let i = 0; i < this.length; i++) { + newArray.push(callback(this[i], i, this)); } return newArray; }; diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md index db64184ff83..bb75c6397fa 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md @@ -24,7 +24,23 @@ const _callback = item => item % 2; assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); ``` -不应该使用 `filter` 方法。 +`["naomi", "quincy", "camperbot"].myFilter(element => element === "naomi")` should return `["naomi"]`. + +```js +const _test_s = ["naomi", "quincy", "camperbot"]; +const _callback = element => element === "naomi"; +assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); +``` + +`[1, 1, 2, 5, 2].myFilter((element, index, array) => array.indexOf(element) === index)` should return `[1, 2, 5]`. + +```js +const _test_s = [1, 1, 2, 5, 2]; +const _callback = (element, index, array) => array.indexOf(element) === index; +assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); +``` + +Your code should not use the `filter` method. ```js assert(!code.match(/\.?[\s\S]*?filter/g)); @@ -50,7 +66,7 @@ Array.prototype.myFilter = function(callback) { Array.prototype.myFilter = function(callback) { const newArray = []; for (let i = 0; i < this.length; i++) { - if (callback(this[i])) newArray.push(this[i]); + if (callback(this[i], i, this)) newArray.push(this[i]); } return newArray; }; diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/reverse-a-string.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/reverse-a-string.md index 380d946e7fd..00c935a7e83 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/reverse-a-string.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/reverse-a-string.md @@ -8,31 +8,31 @@ dashedName: reverse-a-string # --description-- -Reverse the provided string and return the reversed string. +Invertir la cadena proporcionada y devolver la cadena invertida. -For example, `"hello"` should become `"olleh"`. +Por ejemplo, `"hello"` debe convertirse `"olleh"`. # --hints-- -`reverseString("hello")` should return a string. +`reverseString("hello")` debe devolver una cadena. ```js assert(typeof reverseString('hello') === 'string'); ``` -`reverseString("hello")` should return the string `olleh`. +`reverseString("hello")` debe devolver la cadena `olleh`. ```js assert(reverseString('hello') === 'olleh'); ``` -`reverseString("Howdy")` should return the string `ydwoH`. +`reverseString("Howdy")` debe devolver la cadena `ydwoH`. ```js assert(reverseString('Howdy') === 'ydwoH'); ``` -`reverseString("Greetings from Earth")` should return the string `htraE morf sgniteerG`. +`reverseString("Greetings from Earth")` debe devolver la cadena `htraE morf sgniteerG`. ```js assert(reverseString('Greetings from Earth') === 'htraE morf sgniteerG'); diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md index af466c683ac..02a50278f63 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md @@ -109,7 +109,7 @@ assert( ); ``` -A `setter` should be defined. +Un `setter` debe ser definido. ```js assert( diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md index e1b864a6278..cd7f6fb98a6 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md @@ -20,7 +20,7 @@ Escribe tu propio `Array.prototype.myMap()`, el cual debe comportarse exactament # --hints-- -`[23, 65, 98, 5, 13].myMap(item => item * 2)` should equal `[46, 130, 196, 10, 26]`. +`[23, 65, 98, 5, 13].myMap(item => item * 2)` debe ser igual a: `[46, 130, 196, 10, 26]`. ```js const _test_s = [46, 130, 196, 10, 13]; @@ -28,7 +28,23 @@ const _callback = item => item * 2; assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); ``` -Tu código no debe utilizar el método `map`. +`["naomi", "quincy", "camperbot"].myMap(element => element.toUpperCase())` should return `["NAOMI", "QUINCY", "CAMPERBOT"]`. + +```js +const _test_s = ["naomi", "quincy", "camperbot"]; +const _callback = element => element.toUpperCase(); +assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); +``` + +`[1, 1, 2, 5, 2].myMap((element, index, array) => array[i + 1] || array[0])` should return `[1, 2, 5, 2, 1]`. + +```js +const _test_s = [1, 1, 2, 5, 2]; +const _callback = (element, index, array) => array[index + 1] || array[0]; +assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); +``` + +Your code should not use the `map` method. ```js assert(!code.match(/\.?[\s\S]*?map/g)); @@ -53,8 +69,8 @@ Array.prototype.myMap = function(callback) { ```js Array.prototype.myMap = function(callback) { const newArray = []; - for (const elem of this) { - newArray.push(callback(elem)); + for (let i = 0; i < this.length; i++) { + newArray.push(callback(this[i], i, this)); } return newArray; }; diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md index 058fca8aadf..a1eba1411fa 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md @@ -16,7 +16,7 @@ Escribe tu propio `Array.prototype.myFilter()`, que debe comportarse exactamente # --hints-- -`[23, 65, 98, 5, 13].myFilter(item => item % 2)` should equal `[23, 65, 5, 13]`. +`[23, 65, 98, 5, 13].myFilter(item => item % 2)` debe ser igual a `[23, 65, 5, 13]`. ```js const _test_s = [23, 65, 98, 5, 13]; @@ -24,7 +24,23 @@ const _callback = item => item % 2; assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); ``` -Tu código no debe utilizar el método `filter`. +`["naomi", "quincy", "camperbot"].myFilter(element => element === "naomi")` should return `["naomi"]`. + +```js +const _test_s = ["naomi", "quincy", "camperbot"]; +const _callback = element => element === "naomi"; +assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); +``` + +`[1, 1, 2, 5, 2].myFilter((element, index, array) => array.indexOf(element) === index)` should return `[1, 2, 5]`. + +```js +const _test_s = [1, 1, 2, 5, 2]; +const _callback = (element, index, array) => array.indexOf(element) === index; +assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); +``` + +Your code should not use the `filter` method. ```js assert(!code.match(/\.?[\s\S]*?filter/g)); @@ -50,7 +66,7 @@ Array.prototype.myFilter = function(callback) { Array.prototype.myFilter = function(callback) { const newArray = []; for (let i = 0; i < this.length; i++) { - if (callback(this[i])) newArray.push(this[i]); + if (callback(this[i], i, this)) newArray.push(this[i]); } return newArray; }; diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.md index d1e85e3f5f2..3647da8e742 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.md @@ -10,7 +10,7 @@ dashedName: use-the-filter-method-to-extract-data-from-an-array Otra función útil de los arreglos es `Array.prototype.filter()` o simplemente `filter()`. -`filter` calls a function on each element of an array and returns a new array containing only the elements for which that function returns a truthy value - that is, a value which returns `true` if passed to the `Boolean()` constructor. En otras palabras, filtra el arreglo, basándose en la función que se le pasa. Al igual que `map`, hace esto sin necesidad de modificar el arreglo original. +`filter` Llama a una función sobre cada elemento del arreglo y devuelve un nuevo arreglo, conteniendo solo los elementos para los cuales la función devolvió un valor de verdadero - Es decir, un valor que devuelve `true` si paso al constructor `Boolean()`. En otras palabras, filtra el arreglo, basándose en la función que se le pasa. Al igual que `map`, hace esto sin necesidad de modificar el arreglo original. La función callback acepta tres argumentos. El primer argumento es el elemento actual que se está procesando. El segundo es el índice de ese elemento y el tercero es el arreglo sobre el que se llamó al método `filter`. diff --git a/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md b/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md index a0a8bbe910d..b876b7d1fff 100644 --- a/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md +++ b/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md @@ -14,19 +14,19 @@ Crea una aplicación full stack de JavaScript que sea funcionalmente similar a e - Usa este proyecto inicial de Replit para completar tu proyecto. - Utiliza un constructor de sitios de tu elección para completar el proyecto. Asegúrate de incorporar todos los archivos de nuestro repositorio de GitHub. -If you use Replit, follow these steps to set up the project: +Si usas Replit, sigue los siguientes pasos para configurar el proyecto: -- Start by importing the project on Replit. -- Next, you will see a `.replit` window. -- Select `Use run command` and click the `Done` button. +- Comienza importando el proyecto en Replit. +- Después, verás una ventana `.replit`. +- Selecciona `Use run command` y haz clic en el botón `Done`. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +Cuando hayas terminado, asegúrate que un demo funcional de tu proyecto esté alojado en algún sitio público. Luego, envía la URL en el campo `Solution Link`. Opcionalmente, también envía un enlace al código fuente de tu proyecto en el campo `GitHub Link`. # --instructions-- -Your responses should have the following structures. +Tus respuestas deben tener las siguientes estructuras. -Exercise: +Ejercicio: ```js { @@ -38,7 +38,7 @@ Exercise: } ``` -User: +Usuario: ```js { @@ -62,11 +62,11 @@ Log: } ``` -**Hint:** For the `date` property, the `toDateString` method of the `Date` API can be used to achieve the expected output. +**Pista:** Para la propiedad `date`, el método `toDateString` de la API `Date` puede ser usado para conseguir el resultado esperado. # --hints-- -You should provide your own project, not the example URL. +Debes proporcionar tu propio proyecto, no la URL del ejemplo. ```js (getUserInput) => { @@ -77,7 +77,7 @@ You should provide your own project, not the example URL. }; ``` -You can `POST` to `/api/users` with form data `username` to create a new user. +Puedes hacer una petición `POST` a `/api/users` con los datos de formulario que tenga la propiedad `username` para crear un nuevo usuario. ```js async (getUserInput) => { @@ -94,7 +94,7 @@ async (getUserInput) => { }; ``` -The returned response from `POST /api/users` with form data `username` will be an object with `username` and `_id` properties. +La respuesta devuelta de `POST /api/users` con datos de formulario `username` será un objeto con propiedades `username` y `_id`. ```js async (getUserInput) => { @@ -114,7 +114,7 @@ async (getUserInput) => { }; ``` -You can make a `GET` request to `/api/users` to get a list of all users. +Puedes hacer una petición `GET` a `/api/users` para obtener una lista con todos los usuarios. ```js async(getUserInput) => { @@ -127,7 +127,7 @@ async(getUserInput) => { }; ``` -The `GET` request to `/api/users` returns an array. +La petición `GET` a `/api/users` devuelve un arreglo. ```js async(getUserInput) => { @@ -142,7 +142,7 @@ async(getUserInput) => { }; ``` -Each element in the array returned from `GET /api/users` is an object literal containing a user's `username` and `_id`. +Cada elemento en el arreglo devuelto desde `GET /api/users` es un literal de objeto que contiene el `username` y `_id`. ```js async(getUserInput) => { @@ -162,7 +162,7 @@ async(getUserInput) => { }; ``` -You can `POST` to `/api/users/:_id/exercises` with form data `description`, `duration`, and optionally `date`. If no date is supplied, the current date will be used. +Puedes hacer una petición `POST` a `/api/users/:_id/exercises` con datos de formulario `description`, `duration`, y opcionalmente `date`. Si no se proporciona ninguna fecha, se utilizará la fecha actual. ```js async (getUserInput) => { @@ -196,7 +196,7 @@ async (getUserInput) => { }; ``` -The response returned from `POST /api/users/:_id/exercises` will be the user object with the exercise fields added. +La respuesta devuelta desde `POST /api/users/:_id/exercises` será el objeto de usuario con los campos de ejercicio añadidos. ```js async (getUserInput) => { @@ -235,7 +235,7 @@ async (getUserInput) => { }; ``` -You can make a `GET` request to `/api/users/:_id/logs` to retrieve a full exercise log of any user. +Puedes hacer una petición `GET` a `/api/users/:_id/logs` para recuperar un log completo del ejercicio de cualquier usuario. ```js async (getUserInput) => { @@ -274,7 +274,7 @@ async (getUserInput) => { }; ``` -A request to a user's log `GET /api/users/:_id/logs` returns a user object with a `count` property representing the number of exercises that belong to that user. +Una solicitud al log del usuario `GET /api/users/:_id/logs` devuelve un objeto de usuario con una propiedad `count` representando el número de ejercicios que pertenecen a ese usuario. ```js async (getUserInput) => { @@ -315,7 +315,7 @@ async (getUserInput) => { }; ``` -A `GET` request to `/api/users/:_id/logs` will return the user object with a `log` array of all the exercises added. +Una solicitud `GET` a `/api/users/:_id/logs` devolverá el objeto de usuario con un arreglo `log` de todos los ejercicios añadidos. ```js async(getUserInput) => { @@ -359,7 +359,7 @@ async(getUserInput) => { }; ``` -Each item in the `log` array that is returned from `GET /api/users/:_id/logs` is an object that should have a `description`, `duration`, and `date` properties. +Cada elemento en el arreglo `log` que es devuelto desde `GET /api/users/:_id/logs` es un objeto que debe tener las propiedades `description`, `duration` y `date`. ```js async(getUserInput) => { @@ -406,7 +406,7 @@ async(getUserInput) => { }; ``` -The `description` property of any object in the `log` array that is returned from `GET /api/users/:_id/logs` should be a string. +La propiedad `description` de cualquier objeto en el arreglo `log` que es devuelto desde `GET /api/users/:_id/logs` debe ser una cadena. ```js async(getUserInput) => { @@ -453,7 +453,7 @@ async(getUserInput) => { }; ``` -The `duration` property of any object in the `log` array that is returned from `GET /api/users/:_id/logs` should be a number. +La propiedad `duration` de cualquier objeto en el arreglo `log` que es devuelto desde `GET /api/users/:_id/logs` debe ser un número. ```js async(getUserInput) => { @@ -500,7 +500,7 @@ async(getUserInput) => { }; ``` -The `date` property of any object in the `log` array that is returned from `GET /api/users/:_id/logs` should be a string. Use the `dateString` format of the `Date` API. +La propiedad `date` de cualquier objeto en el arreglo `log` que es devuelto desde `GET /api/users/:_id/logs` debe ser una cadena. Utiliza el formato `dateString` de la API `Date`. ```js async(getUserInput) => { @@ -547,7 +547,7 @@ async(getUserInput) => { }; ``` -You can add `from`, `to` and `limit` parameters to a `GET /api/users/:_id/logs` request to retrieve part of the log of any user. `from` and `to` are dates in `yyyy-mm-dd` format. `limit` is an integer of how many logs to send back. +Puedes añadir parámetros `from`, `to` y `limit` a una petición `GET /api/users/:_id/logs` para recuperar parte del log de cualquier usuario. `from` y `to` son fechas en formato `yyyy-mm-dd`. `limit` es un número entero de cuántos logs hay que devolver. ```js async (getUserInput) => { diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/build-a-survey-form-project/build-a-survey-form.md b/curriculum/challenges/espanol/14-responsive-web-design-22/build-a-survey-form-project/build-a-survey-form.md index b1f5dbd3989..8ebdaf353e4 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/build-a-survey-form-project/build-a-survey-form.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/build-a-survey-form-project/build-a-survey-form.md @@ -19,7 +19,7 @@ dashedName: build-a-survey-form 1. Dentro del elemento form **required** (requerido) ingresar tu nombre en un campo de `input` que tenga un `id` de `email` 1. Si ingresas un email que no tenga el formato correcto, verás un error de validación HTML5 1. Dentro del formulario, puedes ingresar un número en un campo de `input` que tenga un `id` de `number` -1. The number input should not accept non-numbers, either by preventing you from typing them or by showing an HTML5 validation error (depending on your browser). +1. La entrada de números no debe aceptar caracteres no numéricos, ya sea impidiendo que los escribas o mostrando un error de validación HTML5 (dependiendo del navegador). 1. Si ingrisas un número que esté fuera del rango de números permitido, que es definido por los atributos `min` y `max`, verás un error de validación de HTML5 1. Para los campos de entrada de nombre, email y número, puedes ver los correspondientes elementos `label` en el formulario, que describen el propósito de cada campo con los siguientes id: `id="name-label"`, `id="email-label"` y `id="number-label"` 1. Para los campos de entrada de nombre, email y número, podrás ver un texto provisional que da una descripción o instrucciones para cada campo @@ -119,7 +119,7 @@ const el = document.getElementById('email') assert(!!el && el.required) ``` -Your `#email` should be a descendant of `#survey-form`. +Tú `#email` debe ser descendiente de `#survey-form`. ```js const el = document.querySelector('#survey-form #email') diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613e275749ebd008e74bb62e.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613e275749ebd008e74bb62e.md index aaf3fb500aa..d6af389db0b 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613e275749ebd008e74bb62e.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613e275749ebd008e74bb62e.md @@ -9,7 +9,7 @@ dashedName: step-8 Una propiedad útil de un _SVG_ (gráficos vectoriales escalables) es que contiene un atributo `path` que permite escalar la imagen sin afectar la resolución de la imagen resultante. -Currently, the `img` is assuming its default size, which is too large. De manera adecuada, escala la imagen usando el `id` como selector y establece el `width` a `max(100px, 18vw)`. +Actualmente, el `img` está asumiendo el tamaño predeterminado, el cual es demasiado grande. De manera adecuada, escala la imagen usando el `id` como selector y establece el `width` a `max(100px, 18vw)`. # --hints-- diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6140883f74224508174794c0.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6140883f74224508174794c0.md index f7d803b3508..a2c04ed27b8 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6140883f74224508174794c0.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6140883f74224508174794c0.md @@ -7,7 +7,7 @@ dashedName: step-10 # --description-- -Make the `header` take up the full width of its parent container, set its `height` to `50px`, and set the `background-color` to `#1b1b32`. Luego, establece el `display` para usar _Flexbox_. +Haz que el `header` ocupe todo el ancho de tu contenedor principal, establece su `height` a `50px` y el `background-color` a `#1b1b32`. Luego, establece el `display` para usar _Flexbox_. # --hints-- diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/616d4a84b756d9c4b8255093.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/616d4a84b756d9c4b8255093.md index 048286675fd..bf8c5757470 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/616d4a84b756d9c4b8255093.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/616d4a84b756d9c4b8255093.md @@ -7,7 +7,7 @@ dashedName: step-11 # --description-- -It's time to add some color to the marker. Recuerda que una forma de añadir color a un elemento es utilizando el nombre del color en inglés, como `black` (negro), `cyan` (cian) o `yellow` (amarillo). +Es hora de agregar algo de color al marcador. Recuerda que una forma de añadir color a un elemento es utilizando el nombre del color en inglés, como `black` (negro), `cyan` (cian) o `yellow` (amarillo). Como recordatorio, aquí está cómo vincular la clase `freecodecamp`: @@ -19,17 +19,17 @@ Como recordatorio, aquí está cómo vincular la clase `freecodecamp`: Crea una nueva regla CSS que apunta a la clase `marker`y establezca la `background-color` a `red`. -**Note:** You will not see any changes after adding the CSS. +**Nota:** No verás ningún cambio después de agregar el CSS. # --hints-- -You should create a class selector to target the `marker` class. +Debes crear un selector de clase para orientar la clase `marker`. ```js assert(new __helpers.CSSHelp(document).getStyle('.marker')); ``` -Your `.marker` CSS rule should have a `background-color` property set to `red`. +La regla CSS `.marker` debe tener una propiedad `background-color` establecida en `red`. ```js assert(new __helpers.CSSHelp(document).getStyle('.marker')?.backgroundColor === 'red'); diff --git a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md index 48195835b76..8a779a9f8dd 100644 --- a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md +++ b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md @@ -28,7 +28,23 @@ const _callback = item => item * 2; assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); ``` -Dein Code sollte nicht die `map` Methode verwenden. +`["naomi", "quincy", "camperbot"].myMap(element => element.toUpperCase())` should return `["NAOMI", "QUINCY", "CAMPERBOT"]`. + +```js +const _test_s = ["naomi", "quincy", "camperbot"]; +const _callback = element => element.toUpperCase(); +assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); +``` + +`[1, 1, 2, 5, 2].myMap((element, index, array) => array[i + 1] || array[0])` should return `[1, 2, 5, 2, 1]`. + +```js +const _test_s = [1, 1, 2, 5, 2]; +const _callback = (element, index, array) => array[index + 1] || array[0]; +assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); +``` + +Your code should not use the `map` method. ```js assert(!code.match(/\.?[\s\S]*?map/g)); @@ -53,8 +69,8 @@ Array.prototype.myMap = function(callback) { ```js Array.prototype.myMap = function(callback) { const newArray = []; - for (const elem of this) { - newArray.push(callback(elem)); + for (let i = 0; i < this.length; i++) { + newArray.push(callback(this[i], i, this)); } return newArray; }; diff --git a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md index ed69c618480..4402b8b18d8 100644 --- a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md +++ b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md @@ -24,7 +24,23 @@ const _callback = item => item % 2; assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); ``` -Dein Code sollte nicht die `filter` Methode verwenden. +`["naomi", "quincy", "camperbot"].myFilter(element => element === "naomi")` should return `["naomi"]`. + +```js +const _test_s = ["naomi", "quincy", "camperbot"]; +const _callback = element => element === "naomi"; +assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); +``` + +`[1, 1, 2, 5, 2].myFilter((element, index, array) => array.indexOf(element) === index)` should return `[1, 2, 5]`. + +```js +const _test_s = [1, 1, 2, 5, 2]; +const _callback = (element, index, array) => array.indexOf(element) === index; +assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); +``` + +Your code should not use the `filter` method. ```js assert(!code.match(/\.?[\s\S]*?filter/g)); @@ -50,7 +66,7 @@ Array.prototype.myFilter = function(callback) { Array.prototype.myFilter = function(callback) { const newArray = []; for (let i = 0; i < this.length; i++) { - if (callback(this[i])) newArray.push(this[i]); + if (callback(this[i], i, this)) newArray.push(this[i]); } return newArray; }; diff --git a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md index 2379b44a517..517e0e284c6 100644 --- a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md +++ b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md @@ -28,7 +28,23 @@ const _callback = item => item * 2; assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); ``` -Il tuo codice non dovrebbe usare il metodo `map`. +`["naomi", "quincy", "camperbot"].myMap(element => element.toUpperCase())` should return `["NAOMI", "QUINCY", "CAMPERBOT"]`. + +```js +const _test_s = ["naomi", "quincy", "camperbot"]; +const _callback = element => element.toUpperCase(); +assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); +``` + +`[1, 1, 2, 5, 2].myMap((element, index, array) => array[i + 1] || array[0])` should return `[1, 2, 5, 2, 1]`. + +```js +const _test_s = [1, 1, 2, 5, 2]; +const _callback = (element, index, array) => array[index + 1] || array[0]; +assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); +``` + +Your code should not use the `map` method. ```js assert(!code.match(/\.?[\s\S]*?map/g)); @@ -53,8 +69,8 @@ Array.prototype.myMap = function(callback) { ```js Array.prototype.myMap = function(callback) { const newArray = []; - for (const elem of this) { - newArray.push(callback(elem)); + for (let i = 0; i < this.length; i++) { + newArray.push(callback(this[i], i, this)); } return newArray; }; diff --git a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md index 50048ad11b3..0fd3fa04cc6 100644 --- a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md +++ b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md @@ -24,7 +24,23 @@ const _callback = item => item % 2; assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); ``` -Il tuo codice non dovrebbe usare il metodo `filter`. +`["naomi", "quincy", "camperbot"].myFilter(element => element === "naomi")` should return `["naomi"]`. + +```js +const _test_s = ["naomi", "quincy", "camperbot"]; +const _callback = element => element === "naomi"; +assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); +``` + +`[1, 1, 2, 5, 2].myFilter((element, index, array) => array.indexOf(element) === index)` should return `[1, 2, 5]`. + +```js +const _test_s = [1, 1, 2, 5, 2]; +const _callback = (element, index, array) => array.indexOf(element) === index; +assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); +``` + +Your code should not use the `filter` method. ```js assert(!code.match(/\.?[\s\S]*?filter/g)); @@ -50,7 +66,7 @@ Array.prototype.myFilter = function(callback) { Array.prototype.myFilter = function(callback) { const newArray = []; for (let i = 0; i < this.length; i++) { - if (callback(this[i])) newArray.push(this[i]); + if (callback(this[i], i, this)) newArray.push(this[i]); } return newArray; }; diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/falsy-bouncer.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/falsy-bouncer.md index 38c4b0276f8..daf90ebb34a 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/falsy-bouncer.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/falsy-bouncer.md @@ -1,6 +1,6 @@ --- id: adf08ec01beb4f99fc7a68f2 -title: 偽値用心棒 +title: 偽値を取り除く「用心棒」 challengeType: 1 forumTopicId: 16014 dashedName: falsy-bouncer @@ -8,7 +8,7 @@ dashedName: falsy-bouncer # --description-- -Remove all falsy values from an array. Return a new array; do not mutate the original array. +すべての偽値を配列から取り除いてください。 元の配列は変更せずに、新しい配列を返してください。 JavaScriptにおける偽値とは、`false`、`null`、`0`、`""`、`undefined`、そして `NaN` です。 @@ -40,7 +40,7 @@ assert.deepEqual(bouncer([false, null, 0, NaN, undefined, '']), []); assert.deepEqual(bouncer([null, NaN, 1, 2, undefined]), [1, 2]); ``` -You should not mutate `arr`. +`arr` は変更しないでください。 ```js const arr = ['a', false, 0, 'Naomi']; diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/reverse-a-string.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/reverse-a-string.md index fe88c8be267..8bebfe9968e 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/reverse-a-string.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/reverse-a-string.md @@ -8,31 +8,31 @@ dashedName: reverse-a-string # --description-- -Reverse the provided string and return the reversed string. +与えられた文字列を反転させて、反転した文字列を返してください。 -For example, `"hello"` should become `"olleh"`. +例えば、`"hello"` は `"olleh"` となるようにしてください。 # --hints-- -`reverseString("hello")` should return a string. +`reverseString("hello")` は文字列を返す必要があります。 ```js assert(typeof reverseString('hello') === 'string'); ``` -`reverseString("hello")` should return the string `olleh`. +`reverseString("hello")` は文字列 `olleh` を返す必要があります。 ```js assert(reverseString('hello') === 'olleh'); ``` -`reverseString("Howdy")` should return the string `ydwoH`. +`reverseString("Howdy")` は文字列 `ydwoH` を返す必要があります。 ```js assert(reverseString('Howdy') === 'ydwoH'); ``` -`reverseString("Greetings from Earth")` should return the string `htraE morf sgniteerG`. +`reverseString("Greetings from Earth")` は文字列 `htraE morf sgniteerG` を返す必要があります。 ```js assert(reverseString('Greetings from Earth') === 'htraE morf sgniteerG'); diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.md index 9c65197318c..63fe214315b 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.md @@ -9,7 +9,7 @@ dashedName: access-multi-dimensional-arrays-with-indexes # --description-- -多次元配列は、*配列の配列*として考えることができます。 When you use brackets to access your array, the first set of brackets refers to the entries in the outermost (the first level) array, and each additional pair of brackets refers to the next level of entries inside. +多次元配列は、*配列の配列*として考えることができます。 ブラケット (角括弧) を使用して配列にアクセスする場合、最初のブラケットの組は、一番外側 (最初の階層) の配列の項目を参照します。ブラケットを追加するたびに、そのひとつ内側の階層の項目を参照します。 **例** diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md index 4c2dec37553..e3f30b358f0 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md @@ -11,12 +11,12 @@ dashedName: escape-sequences-in-strings 文字列の中でエスケープできる文字は引用符だけではありません。 エスケープ文字を使用するのには 2 つ理由があります。 -1. To allow you to use characters you may not otherwise be able to type out, such as a newline. -2. 文字列中で複数の引用符を表現でき、JavaScript が正しく解釈できるようになります。 +1. 改行のように、他の方法では入力できない文字を使用できるようにするため。 +2. 文字列中で複数種類の引用符を使用する場合に、JavaScript が正しく解釈できるようにするため。 前のチャレンジでは次のことを学習しました。 -
コード出力
\'シングルクォート
\"ダブルクォート
\\バックスラッシュ (日本語では円記号)
\n改行
\ttab
\rcarriage return
\b単語境界
\f改ページ
+
コード出力
\'シングルクォート
\"ダブルクォート
\\バックスラッシュ (日本語では円記号)
\n改行
\tタブ
\rキャリッジリターン
\b単語境界
\f改ページ
*バックスラッシュ自体をバックスラッシュとして表示するためにはエスケープする必要があります。* diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-countdown.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-countdown.md index 01ed88f780d..0819dd030db 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-countdown.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-countdown.md @@ -71,7 +71,7 @@ assert( ); ``` -Global variables should not be used to cache the array. +配列をキャッシュするためにグローバル変数を使用しないでください。 ```js countdown(1) diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers.md index 7193be81812..5a2773b16d3 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers.md @@ -56,7 +56,7 @@ assert.deepStrictEqual(rangeOfNumbers(6, 9), [6, 7, 8, 9]); assert.deepStrictEqual(rangeOfNumbers(4, 4), [4]); ``` -Global variables should not be used to cache the array. +配列をキャッシュするためにグローバル変数を使用しないでください。 ```js rangeOfNumbers(1, 3) diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/using-objects-for-lookups.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/using-objects-for-lookups.md index f021ab195b1..396c7b3f37b 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/using-objects-for-lookups.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/using-objects-for-lookups.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244ca -title: オブジェクトを使用してルックアップ検索を行う +title: オブジェクトを使用して検索を行う challengeType: 1 videoUrl: 'https://scrimba.com/c/cdBk8sM' forumTopicId: 18373 @@ -9,9 +9,9 @@ dashedName: using-objects-for-lookups # --description-- -オブジェクトは、辞書のようなキー/値の保管場所と捉えることができます。 表形式のデータがある場合、`switch` ステートメントや `if/else` のチェーンを使用せずに、オブジェクトを利用して値のルックアップ検索を行うことができます。 この方法は、入力データが特定の範囲に制限されていることがわかっている場合に特に便利です。 +オブジェクトは、辞書のようなキー/値の保管場所と捉えることができます。 表形式のデータがある場合、`switch` ステートメントや `if/else` のチェーンを使用せずに、オブジェクトを利用して目的の値を探すことができます。 この方法は、入力データが特定の範囲に制限されていることがわかっている場合に特に便利です。 -Here is an example of an article object: +下記は記事 (article) を表すオブジェクトを使った例です。 ```js const article = { @@ -30,7 +30,7 @@ const value = "title"; const valueLookup = article[value]; ``` -`articleAuthor` is the string `Kaashan Hussain`, `articleLink` is the string `https://www.freecodecamp.org/news/a-complete-guide-to-creating-objects-in-javascript-b0e2450655e8/`, and `valueLookup` is the string `How to create objects in JavaScript`. +`articleAuthor` は `Kaashan Hussain` という文字列、`articleLink` は `https://www.freecodecamp.org/news/a-complete-guide-to-creating-objects-in-javascript-b0e2450655e8/` という文字列、`valueLookup` は `How to create objects in JavaScript` という文字列になります。 # --instructions-- diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/debugging/catch-misspelled-variable-and-function-names.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/debugging/catch-misspelled-variable-and-function-names.md index ad6daa28818..c3287f53f8a 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/debugging/catch-misspelled-variable-and-function-names.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/debugging/catch-misspelled-variable-and-function-names.md @@ -1,6 +1,6 @@ --- id: 587d7b84367417b2b2512b35 -title: 変数名や関数名のスペルミスをキャッチする +title: 変数名や関数名のスペルミスを見つける challengeType: 1 forumTopicId: 301186 dashedName: catch-misspelled-variable-and-function-names @@ -8,7 +8,7 @@ dashedName: catch-misspelled-variable-and-function-names # --description-- -`console.log()` と `typeof` メソッドの 2 つは、中間値やプログラム出力の型を確認する場合によく使用されます。 よくあるバグとして、 スペルミスがあります。タイピングの速い人が起こしがちな構文レベルの問題の 1 つです。 +`console.log()` と `typeof` メソッドの 2 つは、中間値やプログラム出力の型を確認する場合によく使用されます。 よくあるバグの原因として、 スペルミスがあります。タイピングの速い人が起こしがちな構文レベルの問題の 1 つです。 変数名や関数名の文字が、入れ替わっていたり、不足していたり、大文字小文字が間違っていたりすると、ブラウザーで存在しないオブジェクトが検索され、結果として参照エラーという形でエラーが表示されます。 JavaScript の変数名や関数名は大文字と小文字が区別されます。 @@ -24,7 +24,7 @@ netWorkingCapital の計算で使用されている 2 つの変数のスペル assert(netWorkingCapital === 2); ``` -There should be no instances of misspelled variables in the code. +コード内の変数にスペルミスがあってはいけません。 ```js assert(!code.match(/recievables/g)); @@ -36,7 +36,7 @@ assert(!code.match(/recievables/g)); assert(code.match(/receivables/g).length == 2); ``` -There should be no instances of misspelled variables in the code. +コード内の変数にスペルミスがあってはいけません。 ```js assert(!code.match(/payable;/g)); diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-class-syntax-to-define-a-constructor-function.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-class-syntax-to-define-a-constructor-function.md index cb97b882688..67b961854fe 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-class-syntax-to-define-a-constructor-function.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-class-syntax-to-define-a-constructor-function.md @@ -12,9 +12,9 @@ ES6 では、class キーワードを使用してオブジェクト `class` 構文は単なる構文にすぎません。Java、Python、Ruby などの言語とは異なり、オブジェクト指向のパラダイムをクラスベースで本格的に実装するものではないことに注意してください。 -In ES5, an object can be created by defining a `constructor` function and using the `new` keyword to instantiate the object. +ES5 では、オブジェクトを作成するには `constructor` 関数を定義し、`new` キーワードを使用してオブジェクトをインスタンス化します。 -In ES6, a `class` declaration has a `constructor` method that is invoked with the `new` keyword. If the `constructor` method is not explicitly defined, then it is implicitly defined with no arguments. +ES6 では、`class` 宣言が `new` キーワードにより呼び出される `constructor` メソッドを持ちます。 `constructor` メソッドが明示的に定義されない場合は、暗黙的に引数なしで定義されます。 ```js // Explicit constructor diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md index fd70f94af27..3d18ff5428f 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md @@ -26,11 +26,11 @@ console.log(arr); # --instructions-- -Use a destructuring assignment with the rest parameter to emulate the behavior of `Array.prototype.slice()`. `removeFirstTwo()` should return a sub-array of the original array `list` with the first two elements omitted. +分割代入と残余引数を使用して、`Array.prototype.slice()` と同様の機能を実装してください。 `removeFirstTwo()` が、元の配列 `list` から最初の 2 つの要素を取り除いた部分配列を返すようにしてください。 # --hints-- -`removeFirstTwo([1, 2, 3, 4, 5])` should be `[3, 4, 5]` +`removeFirstTwo([1, 2, 3, 4, 5])` の結果は `[3, 4, 5]` となるべきです。 ```js const testArr_ = [1, 2, 3, 4, 5]; @@ -38,7 +38,7 @@ const testArrWORemoved_ = removeFirstTwo(testArr_); assert(testArrWORemoved_.every((e, i) => e === i + 3) && testArrWORemoved_.length === 3); ``` -`removeFirstTwo()` should not modify `list` +`removeFirstTwo()` は `list` を変更してはいけません。 ```js const testArr_ = [1, 2, 3, 4, 5]; diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md index 29a1f7c9c30..a2dc6593c49 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md @@ -109,7 +109,7 @@ assert( ); ``` -A `setter` should be defined. +`setter` を定義する必要があります。 ```js assert( diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md index f31410f00fe..592b227a72f 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md @@ -28,7 +28,23 @@ const _callback = item => item * 2; assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); ``` -コードでは `map` メソッドを使用しないでください。 +`["naomi", "quincy", "camperbot"].myMap(element => element.toUpperCase())` should return `["NAOMI", "QUINCY", "CAMPERBOT"]`. + +```js +const _test_s = ["naomi", "quincy", "camperbot"]; +const _callback = element => element.toUpperCase(); +assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); +``` + +`[1, 1, 2, 5, 2].myMap((element, index, array) => array[i + 1] || array[0])` should return `[1, 2, 5, 2, 1]`. + +```js +const _test_s = [1, 1, 2, 5, 2]; +const _callback = (element, index, array) => array[index + 1] || array[0]; +assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); +``` + +Your code should not use the `map` method. ```js assert(!code.match(/\.?[\s\S]*?map/g)); @@ -53,8 +69,8 @@ Array.prototype.myMap = function(callback) { ```js Array.prototype.myMap = function(callback) { const newArray = []; - for (const elem of this) { - newArray.push(callback(elem)); + for (let i = 0; i < this.length; i++) { + newArray.push(callback(this[i], i, this)); } return newArray; }; diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md index f18ecacbf18..c54bf75ca22 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md @@ -24,7 +24,23 @@ const _callback = item => item % 2; assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); ``` -`filter` メソッドを使用しないでください。 +`["naomi", "quincy", "camperbot"].myFilter(element => element === "naomi")` should return `["naomi"]`. + +```js +const _test_s = ["naomi", "quincy", "camperbot"]; +const _callback = element => element === "naomi"; +assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); +``` + +`[1, 1, 2, 5, 2].myFilter((element, index, array) => array.indexOf(element) === index)` should return `[1, 2, 5]`. + +```js +const _test_s = [1, 1, 2, 5, 2]; +const _callback = (element, index, array) => array.indexOf(element) === index; +assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); +``` + +Your code should not use the `filter` method. ```js assert(!code.match(/\.?[\s\S]*?filter/g)); @@ -50,7 +66,7 @@ Array.prototype.myFilter = function(callback) { Array.prototype.myFilter = function(callback) { const newArray = []; for (let i = 0; i < this.length; i++) { - if (callback(this[i])) newArray.push(this[i]); + if (callback(this[i], i, this)) newArray.push(this[i]); } return newArray; }; diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md index cbee908d3f4..7524f4413aa 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md @@ -28,6 +28,22 @@ const _callback = item => item * 2; assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); ``` +`["naomi", "quincy", "camperbot"].myMap(element => element.toUpperCase())` deve retornar `["NAOMI", "QUINCY", "CAMPERBOT"]`. + +```js +const _test_s = ["naomi", "quincy", "camperbot"]; +const _callback = element => element.toUpperCase(); +assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); +``` + +`[1, 1, 2, 5, 2].myMap((element, index, array) => array[i + 1] || array[0])` deve retornar `[1, 2, 5, 2, 1]`. + +```js +const _test_s = [1, 1, 2, 5, 2]; +const _callback = (element, index, array) => array[index + 1] || array[0]; +assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); +``` + Você não deve usar o método `map`. ```js @@ -53,8 +69,8 @@ Array.prototype.myMap = function(callback) { ```js Array.prototype.myMap = function(callback) { const newArray = []; - for (const elem of this) { - newArray.push(callback(elem)); + for (let i = 0; i < this.length; i++) { + newArray.push(callback(this[i], i, this)); } return newArray; }; diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md index a56a4594222..6190816d359 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md @@ -24,6 +24,22 @@ const _callback = item => item % 2; assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); ``` +`["naomi", "quincy", "camperbot"].myFilter(element => element === "naomi")` deve retornar `["naomi"]`. + +```js +const _test_s = ["naomi", "quincy", "camperbot"]; +const _callback = element => element === "naomi"; +assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); +``` + +`[1, 1, 2, 5, 2].myFilter((element, index, array) => array.indexOf(element) === index)` deve retornar `[1, 2, 5]`. + +```js +const _test_s = [1, 1, 2, 5, 2]; +const _callback = (element, index, array) => array.indexOf(element) === index; +assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); +``` + Você não deve usar o método `filter`. ```js @@ -50,7 +66,7 @@ Array.prototype.myFilter = function(callback) { Array.prototype.myFilter = function(callback) { const newArray = []; for (let i = 0; i < this.length; i++) { - if (callback(this[i])) newArray.push(this[i]); + if (callback(this[i], i, this)) newArray.push(this[i]); } return newArray; }; diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md index 04482c42bbc..9438f9f93c4 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md @@ -28,7 +28,23 @@ const _callback = item => item * 2; assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); ``` -Не використовуйте метод `map` у вашому коді. +`["naomi", "quincy", "camperbot"].myMap(element => element.toUpperCase())` should return `["NAOMI", "QUINCY", "CAMPERBOT"]`. + +```js +const _test_s = ["naomi", "quincy", "camperbot"]; +const _callback = element => element.toUpperCase(); +assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); +``` + +`[1, 1, 2, 5, 2].myMap((element, index, array) => array[i + 1] || array[0])` should return `[1, 2, 5, 2, 1]`. + +```js +const _test_s = [1, 1, 2, 5, 2]; +const _callback = (element, index, array) => array[index + 1] || array[0]; +assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); +``` + +Your code should not use the `map` method. ```js assert(!code.match(/\.?[\s\S]*?map/g)); @@ -53,8 +69,8 @@ Array.prototype.myMap = function(callback) { ```js Array.prototype.myMap = function(callback) { const newArray = []; - for (const elem of this) { - newArray.push(callback(elem)); + for (let i = 0; i < this.length; i++) { + newArray.push(callback(this[i], i, this)); } return newArray; }; diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md index e8c232cfa75..28daae2eefd 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md @@ -24,7 +24,23 @@ const _callback = item => item % 2; assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); ``` -Не використовуйте метод `filter` для вашого коду. +`["naomi", "quincy", "camperbot"].myFilter(element => element === "naomi")` should return `["naomi"]`. + +```js +const _test_s = ["naomi", "quincy", "camperbot"]; +const _callback = element => element === "naomi"; +assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); +``` + +`[1, 1, 2, 5, 2].myFilter((element, index, array) => array.indexOf(element) === index)` should return `[1, 2, 5]`. + +```js +const _test_s = [1, 1, 2, 5, 2]; +const _callback = (element, index, array) => array.indexOf(element) === index; +assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); +``` + +Your code should not use the `filter` method. ```js assert(!code.match(/\.?[\s\S]*?filter/g)); @@ -50,7 +66,7 @@ Array.prototype.myFilter = function(callback) { Array.prototype.myFilter = function(callback) { const newArray = []; for (let i = 0; i < this.length; i++) { - if (callback(this[i])) newArray.push(this[i]); + if (callback(this[i], i, this)) newArray.push(this[i]); } return newArray; }; diff --git a/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/authentication-strategies.md b/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/authentication-strategies.md index 92c04373b1e..ab7dee1117d 100644 --- a/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/authentication-strategies.md +++ b/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/authentication-strategies.md @@ -36,7 +36,7 @@ Many strategies are set up using different settings. Generally, it is easy to se In the next step, you will set up how to actually call the authentication strategy to validate a user based on form data. -Відправте свою сторінку коли впевнились, що все правильно. If you're running into errors, you can check out the project completed up to this point. +Відправте свою сторінку коли впевнились, що все правильно. Якщо виникають помилки, ви можете переглянути проєкт, виконаний до цього етапу. # --hints-- diff --git a/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/how-to-use-passport-strategies.md b/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/how-to-use-passport-strategies.md index 4b520a09209..9f9a70cd43a 100644 --- a/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/how-to-use-passport-strategies.md +++ b/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/how-to-use-passport-strategies.md @@ -20,7 +20,7 @@ If the authentication was successful, the user object will be saved in `req.user At this point, if you enter a username and password in the form, it should redirect to the home page `/`, and the console of your server should display `'User {USERNAME} attempted to log in.'`, since we currently cannot login a user who isn't registered. -Відправте свою сторінку коли впевнились, що все правильно. If you're running into errors, you can check out the project completed up to this point. +Відправте свою сторінку коли впевнились, що все правильно. Якщо виникають помилки, ви можете переглянути проєкт, виконаний до цього етапу. # --hints-- diff --git a/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication-iii.md b/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication-iii.md index 85104dcd0da..b5f8a240ce0 100644 --- a/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication-iii.md +++ b/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication-iii.md @@ -43,7 +43,7 @@ myDataBase.findOneAndUpdate( You should be able to login to your app now. Try it! -Відправте свою сторінку коли впевнились, що все правильно. If you're running into errors, you can check out the project completed up to this point. +Відправте свою сторінку коли впевнились, що все правильно. Якщо виникають помилки, ви можете переглянути проєкт, виконаний до цього етапу. # --hints-- diff --git a/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/registration-of-new-users.md b/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/registration-of-new-users.md index c27fa4f94cd..f4a7f6fe473 100644 --- a/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/registration-of-new-users.md +++ b/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/registration-of-new-users.md @@ -56,7 +56,7 @@ app.route('/register') ); ``` -Відправте свою сторінку коли впевнились, що все правильно. If you're running into errors, you can check out the project completed up to this point. +Відправте свою сторінку коли впевнились, що все правильно. Якщо виникають помилки, ви можете переглянути проєкт, виконаний до цього етапу. **ПРИМІТКА:** З цього моменту можуть виникнути проблеми з використанням браузеру *picture-in-picture*. Якщо ви використовуєте онлайн IDE, який має попередній перегляд програми в редакторі, рекомендується відкрити цей попередній перегляд у новій вкладці. diff --git a/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/serialization-of-a-user-object.md b/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/serialization-of-a-user-object.md index 2db27e8e958..7c479791055 100644 --- a/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/serialization-of-a-user-object.md +++ b/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/serialization-of-a-user-object.md @@ -46,7 +46,7 @@ const { ObjectID } = require('mongodb'); The `deserializeUser` will throw an error until you set up the database connection. So, for now, comment out the `myDatabase.findOne` call, and just call `done(null, null)` in the `deserializeUser` callback function. -Відправте свою сторінку коли впевнились, що все правильно. If you're running into errors, you can check out the project completed up to this point. +Відправте свою сторінку коли впевнились, що все правильно. Якщо виникають помилки, ви можете переглянути проєкт, виконаний до цього етапу. # --hints-- diff --git a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/issue-tracker.md b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/issue-tracker.md index ee85bb9f8c8..a9196ba0d0c 100644 --- a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/issue-tracker.md +++ b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/issue-tracker.md @@ -1,6 +1,6 @@ --- id: 587d8249367417b2b2512c42 -title: Система відстеження помилок +title: Відстеження проблем challengeType: 4 forumTopicId: 301569 dashedName: issue-tracker @@ -24,28 +24,28 @@ dashedName: issue-tracker # --instructions-- -- Complete the necessary routes in `/routes/api.js` -- Create all of the functional tests in `tests/2_functional-tests.js` -- Copy the `sample.env` file to `.env` and set the variables appropriately -- To run the tests uncomment `NODE_ENV=test` in your `.env` file +- Завершіть необхідні маршрути у `/routes/api.js` +- Створіть усі функціональні тести у `tests/2_functional-tests.js` +- Скопіюйте файл `sample.env` до `.env` та відповідно встановіть змінні +- Щоб провести тести, розкоментуйте `NODE_ENV=test` у своєму файлі `.env` - Щоб запустити тести на консолі, використайте команду `npm run test`. Щоб відкрити консоль Replit, натисніть Ctrl+Shift+P (Cmd на Mac) та введіть «open shell» Напишіть наступні тести в `tests/2_functional-tests.js`: -- Create an issue with every field: POST request to `/api/issues/{project}` -- Create an issue with only required fields: POST request to `/api/issues/{project}` -- Create an issue with missing required fields: POST request to `/api/issues/{project}` -- View issues on a project: GET request to `/api/issues/{project}` -- View issues on a project with one filter: GET request to `/api/issues/{project}` -- View issues on a project with multiple filters: GET request to `/api/issues/{project}` -- Update one field on an issue: PUT request to `/api/issues/{project}` -- Update multiple fields on an issue: PUT request to `/api/issues/{project}` -- Update an issue with missing `_id`: PUT request to `/api/issues/{project}` -- Update an issue with no fields to update: PUT request to `/api/issues/{project}` -- Update an issue with an invalid `_id`: PUT request to `/api/issues/{project}` -- Delete an issue: DELETE request to `/api/issues/{project}` -- Delete an issue with an invalid `_id`: DELETE request to `/api/issues/{project}` -- Delete an issue with missing `_id`: DELETE request to `/api/issues/{project}` +- Створіть проблему з кожним полем: запит POST до `/api/issues/{project}` +- Створіть проблему лише з необхідними полями: запит POST до `/api/issues/{project}` +- Створіть проблему з відсутніми необхідними полями: запит POST до `/api/issues/{project}` +- Перегляньте проблеми проєкту: запит GET до `/api/issues/{project}` +- Перегляньте проблеми проєкту з одним фільтром: запит GET до `/api/issues/{project}` +- Перегляньте проблеми проєкту з декількома фільтрами: запит GET до `/api/issues/{project}` +- Оновіть одне поле проблеми: запит PUT до `/api/issues/{project}` +- Оновіть декілька полів проблеми: запит PUT до `/api/issues/{project}` +- Оновіть проблему з відсутнім `_id`: запит PUT до `/api/issues/{project}` +- Оновіть проблему з неоновлювальними полями: запит PUT до `/api/issues/{project}` +- Оновіть проблему з недійсним `_id`: запит PUT до `/api/issues/{project}` +- Видаліть проблему: запит DELETE до `/api/issues/{project}` +- Видаліть проблему з недійсним `_id`: запит DELETE до `/api/issues/{project}` +- Видаліть проблему з відсутнім `_id`: запит DELETE до `/api/issues/{project}` # --hints-- @@ -57,7 +57,7 @@ dashedName: issue-tracker }; ``` -You can send a `POST` request to `/api/issues/{projectname}` with form data containing the required fields `issue_title`, `issue_text`, `created_by`, and optionally `assigned_to` and `status_text`. +Ви можете надіслати запит `POST` до `/api/issues/{projectname}` з даними форми, включно з обов'язковими полями `issue_title`, `issue_text`, `created_by` і додатковими `assigned_to` та `status_text`. ```js async (getUserInput) => { @@ -79,7 +79,7 @@ async (getUserInput) => { }; ``` -The `POST` request to `/api/issues/{projectname}` will return the created object, and must include all of the submitted fields. Excluded optional fields will be returned as empty strings. Additionally, include `created_on` (date/time), `updated_on` (date/time), `open` (boolean, `true` for open - default value, `false` for closed), and `_id`. +Запит `POST` до `/api/issues/{projectname}` поверне створений об'єкт, та повинен містити всі введені поля. Вилучені необов'язкові поля будуть повернені як порожні рядки. Додатково включіть `created_on` (дата/час), `updated_on` (дата/час), `open` (булеве, значення за замовчуванням `true` для відкритого і `false` для закритого) та `_id`. ```js async (getUserInput) => { @@ -113,7 +113,7 @@ async (getUserInput) => { }; ``` -If you send a `POST` request to `/api/issues/{projectname}` without the required fields, returned will be the error `{ error: 'required field(s) missing' }` +Якщо ви надішлете запит `POST` до `/api/issues/{projectname}` без необхідних полів, повернеться помилка `{ error: 'required field(s) missing' }` ```js async (getUserInput) => { @@ -131,7 +131,7 @@ async (getUserInput) => { }; ``` -You can send a `GET` request to `/api/issues/{projectname}` for an array of all issues for that specific `projectname`, with all the fields present for each issue. +Ви можете надіслати запит `GET` до `/api/issues/{projectname}` для масиву проблем конкретного `projectname`, з усіма наявними полями кожної проблеми. ```js async (getUserInput) => { @@ -178,7 +178,7 @@ async (getUserInput) => { }; ``` -You can send a `GET` request to `/api/issues/{projectname}` and filter the request by also passing along any field and value as a URL query (ie. `/api/issues/{project}?open=false`). You can pass one or more field/value pairs at once. +Ви можете надіслати запит `GET` до `/api/issues/{projectname}` та відфільтрувати запит, передавши будь-яке поле та значення як запит URL (тобто `/api/issues/{project}?open=false`). Ви можете одночасно передати одну чи більше пар поле/значення. ```js async (getUserInput) => { @@ -219,7 +219,7 @@ async (getUserInput) => { }; ``` -You can send a `PUT` request to `/api/issues/{projectname}` with an `_id` and one or more fields to update. On success, the `updated_on` field should be updated, and returned should be `{ result: 'successfully updated', '_id': _id }`. +Ви можете надіслати запит `PUT` до `/api/issues/{projectname}` із `_id` та одним чи більше оновлювальним полем. Якщо все успішно, поле `updated_on` оновиться та повернеться `{ result: 'successfully updated', '_id': _id }`. ```js async (getUserInput) => { @@ -254,7 +254,7 @@ async (getUserInput) => { }; ``` -When the `PUT` request sent to `/api/issues/{projectname}` does not include an `_id`, the return value is `{ error: 'missing _id' }`. +Якщо надісланий запит `PUT` до `/api/issues/{projectname}` не містить `_id`, поверненим значенням буде `{ error: 'missing _id' }`. ```js async (getUserInput) => { @@ -270,7 +270,7 @@ async (getUserInput) => { }; ``` -When the `PUT` request sent to `/api/issues/{projectname}` does not include update fields, the return value is `{ error: 'no update field(s) sent', '_id': _id }`. On any other error, the return value is `{ error: 'could not update', '_id': _id }`. +Якщо надісланий запит `PUT` `/api/issues/{projectname}` не містить оновлювальні поля, поверненим значенням буде `{ error: 'no update field(s) sent', '_id': _id }`. При іншій помилці поверненим значенням буде `{ error: 'could not update', '_id': _id }`. ```js async (getUserInput) => { @@ -300,7 +300,7 @@ async (getUserInput) => { }; ``` -You can send a `DELETE` request to `/api/issues/{projectname}` with an `_id` to delete an issue. If no `_id` is sent, the return value is `{ error: 'missing _id' }`. On success, the return value is `{ result: 'successfully deleted', '_id': _id }`. On failure, the return value is `{ error: 'could not delete', '_id': _id }`. +Ви можете надіслати запит `DELETE` до `/api/issues/{projectname}` із `_id`, щоб видалити проблему. Якщо `_id` не надіслано, поверненим значенням буде `{ error: 'missing _id' }`. Якщо все успішно, поверненим значенням буде `{ result: 'successfully deleted', '_id': _id }`. При помилці поверненим значенням буде `{ error: 'could not delete', '_id': _id }`. ```js async (getUserInput) => { diff --git a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md index 444fdaf43e9..8f21e289cc2 100644 --- a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md +++ b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md @@ -24,10 +24,10 @@ dashedName: metric-imperial-converter # --instructions-- -- Complete the necessary conversion logic in `/controllers/convertHandler.js` -- Complete the necessary routes in `/routes/api.js` -- Copy the `sample.env` file to `.env` and set the variables appropriately -- To run the tests uncomment `NODE_ENV=test` in your `.env` file +- Завершіть необхідну логіку перетворення у `/controllers/convertHandler.js` +- Завершіть необхідні маршрути у `/routes/api.js` +- Скопіюйте файл `sample.env` до `.env` та відповідно встановіть змінні +- Щоб провести тести, розкоментуйте `NODE_ENV=test` у своєму файлі `.env` - Щоб запустити тести на консолі, використайте команду `npm run test`. Щоб відкрити консоль Replit, натисніть Ctrl+Shift+P (Cmd на Mac) та введіть «open shell» Напишіть наступні тести в `tests/1_unit-tests.js`: @@ -36,12 +36,12 @@ dashedName: metric-imperial-converter - `convertHandler` повинен правильно читати введення десяткового числа. - `convertHandler` повинен правильно читати введення дробу. - `convertHandler` повинен правильно читати введення десяткового дробу. -- `convertHandler` should correctly return an error on a double-fraction (i.e. `3/2/3`). -- `convertHandler` should correctly default to a numerical input of `1` when no numerical input is provided. -- `convertHandler` should correctly read each valid input unit. -- `convertHandler` should correctly return an error for an invalid input unit. -- `convertHandler` should return the correct return unit for each valid input unit. -- `convertHandler` should correctly return the spelled-out string unit for each valid input unit. +- `convertHandler` повинен правильно повернути помилку при подвійному дробі (тобто `3/2/3`). +- `convertHandler` повинен правильно приймати ввід `1` за замовчуванням, якщо нічого не введено. +- `convertHandler` повинен правильно читати дійсні введені одиниці. +- `convertHandler` повинен правильно повертати помилку при недійсній введеній одиниці. +- `convertHandler` повинен повернути правильну одиницю для кожної дійсної введеної одиниці. +- `convertHandler` повинен правильно повернути прописаний рядок для кожної дійсної введеної одиниці. - `convertHandler` повинен правильно перетворювати `gal` у `L`. - `convertHandler` повинен правильно перетворювати `L` у `gal`. - `convertHandler` повинен правильно перетворювати `mi` у `km`. diff --git a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/personal-library.md b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/personal-library.md index a54ab4bbb34..a6c5af723b6 100644 --- a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/personal-library.md +++ b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/personal-library.md @@ -24,10 +24,10 @@ dashedName: personal-library # --instructions-- -1. Додайте рядок підключення MongoDB до `.env` без дужок як `DB` Приклад: `DB=mongodb://admin:pass@1234.mlab.com:1234/fccpersonallib` -2. У вашому файлі `.env` встановіть`NODE_ENV` на `test` без дужок -3. Вам потрібно створити усі маршрути в межах `routes/api.js` -4. Ви створите усі функціональні тести в `tests/2_functional-tests.js` +1. Додайте свій рядок з'єднання MongoDB до `.env` без лапок як `DB` Приклад: `DB=mongodb://admin:pass@1234.mlab.com:1234/fccpersonallib` +2. Встановіть `NODE_ENV` на `test` у своєму файлі `.env`, без лапок +3. Ви повинні створити усі маршрути в межах `routes/api.js` +4. Ви створюватимете усі функціональні тести в `tests/2_functional-tests.js` # --hints-- @@ -41,7 +41,7 @@ dashedName: personal-library }; ``` -You can send a POST request to `/api/books` with `title` as part of the form data to add a book. The returned response will be an object with the `title` and a unique `_id` as keys. If `title` is not included in the request, the returned response should be the string `missing required field title`. +Ви можете надіслати запит POST до `/api/books` із `title` як частиною даних форми, щоб додати книжку. Поверненою відповіддю буде об'єкт із `title` та унікальним `_id` як ключі. Якщо `title` немає у запиті, поверненою відповіддю повинен бути рядок `missing required field title`. ```js async (getUserInput) => { @@ -62,7 +62,7 @@ async (getUserInput) => { }; ``` -You can send a GET request to `/api/books` and receive a JSON response representing all the books. The JSON response will be an array of objects with each object (book) containing `title`, `_id`, and `commentcount` properties. +Ви можете надіслати запит GET до `/api/books` та отримати відповідь JSON із представленням усіх книжок. Відповіддю JSON буде масив об'єктів, де кожен об'єкт (книжка) містить властивості `title`, `_id` та `commentcount`. ```js async (getUserInput) => { @@ -90,7 +90,7 @@ async (getUserInput) => { }; ``` -You can send a GET request to `/api/books/{_id}` to retrieve a single object of a book containing the properties `title`, `_id`, and a `comments` array (empty array if no comments present). If no book is found, return the string `no book exists`. +Ви можете надіслати запит GET до `/api/books/{_id}`, щоб отримати книжку, яка містить властивості `title`, `_id` та масив `comments` (порожній масив, якщо коментарі відсутні). Якщо книжки не знайдено, поверніть рядок `no book exists`. ```js async (getUserInput) => { @@ -114,7 +114,7 @@ async (getUserInput) => { }; ``` -You can send a POST request containing `comment` as the form body data to `/api/books/{_id}` to add a comment to a book. The returned response will be the books object similar to GET `/api/books/{_id}` request in an earlier test. If `comment` is not included in the request, return the string `missing required field comment`. If no book is found, return the string `no book exists`. +Ви можете надіслати запит POST, який містить `comment` як дані форми до `/api/books/{_id}`, щоб додати коментар до книжки. Поверненою відповіддю будуть книжки, схоже до запиту GET `/api/books/{_id}` раніше. Якщо `comment` немає у запиті, поверніть рядок `missing required field comment`. Якщо книжки не знайдено, поверніть рядок `no book exists`. ```js async (getUserInput) => { @@ -152,7 +152,7 @@ async (getUserInput) => { }; ``` -You can send a DELETE request to `/api/books/{_id}` to delete a book from the collection. The returned response will be the string `delete successful` if successful. If no book is found, return the string `no book exists`. +Ви можете надіслати запит DELETE до `/api/books/{_id}`, щоб видалити книжку з колекції. Поверненою відповіддю буде рядок `delete successful`, якщо все успішно. Якщо книжки не знайдено, поверніть рядок `no book exists`. ```js async (getUserInput) => { @@ -176,7 +176,7 @@ async (getUserInput) => { }; ``` -You can send a DELETE request to `/api/books` to delete all books in the database. The returned response will be the string `complete delete successful` if successful. +Ви можете надіслати запит DELETE до `/api/books`, щоб видалити всі книжки у базі даних. Поверненою відповіддю буде рядок `complete delete successful`, якщо все успішно. ```js async (getUserInput) => { diff --git a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index 70c9245bca8..e4926c663f3 100644 --- a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -1,6 +1,6 @@ --- id: 5e601bf95ac9d0ecd8b94afd -title: Програма для розв'язування судоку +title: Розв'язувач судоку challengeType: 4 forumTopicId: 462357 dashedName: sudoku-solver @@ -24,46 +24,46 @@ dashedName: sudoku-solver # --instructions-- -- All puzzle logic can go into `/controllers/sudoku-solver.js` - - The `validate` function should take a given puzzle string and check it to see if it has 81 valid characters for the input. - - The `check` functions should be validating against the *current* state of the board. - - The `solve` function should handle solving any given valid puzzle string, not just the test inputs and solutions. You are expected to write out the logic to solve this. -- All routing logic can go into `/routes/api.js` -- See the `puzzle-strings.js` file in `/controllers` for some sample puzzles your application should solve -- To run the challenge tests on this page, set `NODE_ENV` to `test` without quotes in the `.env` file +- Уся логіка головоломки може перейти до `/controllers/sudoku-solver.js` + - Функція `validate` повинна приймати наданий рядок головоломки та перевіряти, чи в ньому є 81 дійсних символів для вводу. + - Функції `check` повинні перевіряти *поточний* стан дошки. + - Функція `solve` повинна обробляти вирішення будь-якого наданого дійсного рядка головоломки, а не лише тестові вводи та вирішення. Від вас очікується написання логіки, яка б вирішувала це. +- Уся логіка маршруту може перейти до `/routes/api.js` +- Перегляньте файл `puzzle-strings.js` у `/controllers` для прикладів головоломок, які повинен розв'язувати ваш додаток +- Щоб запустити тести завдання на цій сторінці, встановіть `NODE_ENV` на `test` без лапок у файлі `.env` - Щоб запустити тести на консолі, використайте команду `npm run test`. Щоб відкрити консоль Replit, натисніть Ctrl+Shift+P (Cmd на Mac) та введіть «open shell» Напишіть наступні тести в `tests/1_unit-tests.js`: -- Logic handles a valid puzzle string of 81 characters -- Logic handles a puzzle string with invalid characters (not 1-9 or `.`) -- Logic handles a puzzle string that is not 81 characters in length -- Logic handles a valid row placement -- Logic handles an invalid row placement -- Logic handles a valid column placement -- Logic handles an invalid column placement -- Logic handles a valid region (3x3 grid) placement -- Logic handles an invalid region (3x3 grid) placement -- Valid puzzle strings pass the solver -- Invalid puzzle strings fail the solver -- Solver returns the expected solution for an incomplete puzzle +- Логіка обробляє дійсний рядок головоломки з 81 символом +- Логіка обробляє рядок головоломки з недійсними символами (не 1-9 або `.`) +- Логіка обробляє рядок головоломки, довжина якого не 81 символ +- Логіка обробляє дійсне розміщення рядочка +- Логіка обробляє недійсне розміщення рядочка +- Логіка обробляє дійсне розміщення стовпчика +- Логіка обробляє недійсне розміщення стовпчика +- Логіка обробляє дійсне розміщення області (сітка 3x3) +- Логіка обробляє недійсне розміщення області (сітка 3x3) +- Дійсні рядки головоломки проходять розв’язувач +- Недійсні рядки головоломки не проходять розв’язувач +- Розв'язувач повертає вирішення для невирішеної головоломки Напишіть наступні тести в `tests/2_functional-tests.js` -- Solve a puzzle with valid puzzle string: POST request to `/api/solve` -- Solve a puzzle with missing puzzle string: POST request to `/api/solve` -- Solve a puzzle with invalid characters: POST request to `/api/solve` -- Solve a puzzle with incorrect length: POST request to `/api/solve` -- Solve a puzzle that cannot be solved: POST request to `/api/solve` -- Check a puzzle placement with all fields: POST request to `/api/check` -- Check a puzzle placement with single placement conflict: POST request to `/api/check` -- Check a puzzle placement with multiple placement conflicts: POST request to `/api/check` -- Check a puzzle placement with all placement conflicts: POST request to `/api/check` -- Check a puzzle placement with missing required fields: POST request to `/api/check` -- Check a puzzle placement with invalid characters: POST request to `/api/check` -- Check a puzzle placement with incorrect length: POST request to `/api/check` -- Check a puzzle placement with invalid placement coordinate: POST request to `/api/check` -- Check a puzzle placement with invalid placement value: POST request to `/api/check` +- Вирішіть головоломку з дійсним рядком головоломки: запит POST до `/api/solve` +- Вирішіть головоломку з відсутнім рядком головоломки: запит POST до `/api/solve` +- Вирішіть головоломку з недійсними символами: запит POST до `/api/solve` +- Вирішіть головоломку з неправильною довжиною: запит POST до `/api/solve` +- Вирішіть головоломку, яку неможливо вирішити: запит POST до `/api/solve` +- Перевірте розміщення головоломки з усіма полями: запит POST до `/api/check` +- Перевірте розміщення головоломки з одним конфліктом розміщення: запит POST до `/api/check` +- Перевірте розміщення головоломки з декількома конфліктами розміщення: запит POST до `/api/check` +- Перевірте розміщення головоломки з усіма конфліктами розміщення: запит POST до `/api/check` +- Перевірте розміщення головоломки з відсутніми необхідними полями: запит POST до `/api/check` +- Перевірте розміщення головоломки з недійсними символами: запит POST до `/api/check` +- Перевірте розміщення головоломки з неправильною довжиною: запит POST до `/api/check` +- Перевірте розміщення головоломки з недійсною координатою розміщення: запит POST до `/api/check` +- Перевірте розміщення головоломки з недійсним значенням розміщення: запит POST до `/api/check` # --hints-- @@ -76,7 +76,7 @@ dashedName: sudoku-solver }; ``` -You can `POST` `/api/solve` with form data containing `puzzle` which will be a string containing a combination of numbers (1-9) and periods `.` to represent empty spaces. The returned object will contain a `solution` property with the solved puzzle. +Ви можете надіслати запит `POST` до `/api/solve` з даними форми, що містять `puzzle`, яка буде рядком з комбінації чисел (1-9) та крапок `.` для представлення порожніх місць. Повернений об'єкт міститиме властивість `solution` з вирішеною головоломкою. ```js async (getUserInput) => { @@ -95,7 +95,7 @@ async (getUserInput) => { }; ``` -If the object submitted to `/api/solve` is missing `puzzle`, the returned value will be `{ error: 'Required field missing' }` +Якщо об'єкт, надісланий до `/api/solve` не має `puzzle`, поверненим значенням буде `{ error: 'Required field missing' }` ```js async (getUserInput) => { @@ -113,7 +113,7 @@ async (getUserInput) => { }; ``` -If the puzzle submitted to `/api/solve` contains values which are not numbers or periods, the returned value will be `{ error: 'Invalid characters in puzzle' }` +Якщо головоломка, надіслана до `/api/solve`, містить значення, які не є числами або крапками, поверненим значенням буде `{ error: 'Invalid characters in puzzle' }` ```js async (getUserInput) => { @@ -131,7 +131,7 @@ async (getUserInput) => { }; ``` -If the puzzle submitted to `/api/solve` is greater or less than 81 characters, the returned value will be `{ error: 'Expected puzzle to be 81 characters long' }` +Якщо головоломка, надіслана до `/api/solve`, містить більше чи менше за 81 символ, поверненим значенням буде `{ error: 'Expected puzzle to be 81 characters long' }` ```js async (getUserInput) => { @@ -153,7 +153,7 @@ async (getUserInput) => { }; ``` -If the puzzle submitted to `/api/solve` is invalid or cannot be solved, the returned value will be `{ error: 'Puzzle cannot be solved' }` +Якщо головоломка, надіслана до `/api/solve`, недійсна або не може бути вирішеною, поверненим значенням буде `{ error: 'Puzzle cannot be solved' }` ```js async (getUserInput) => { @@ -171,7 +171,7 @@ async (getUserInput) => { }; ``` -You can `POST` to `/api/check` an object containing `puzzle`, `coordinate`, and `value` where the `coordinate` is the letter A-I indicating the row, followed by a number 1-9 indicating the column, and `value` is a number from 1-9. +Ви можете надіслати запит `POST` до `/api/check` з об'єктом, який містить `puzzle`, `coordinate` та `value`, де `coordinate` є буквою від А до I (представляє рядочок) і супроводжується числом від 1 до 9 (представляє стовпчик), а `value` є числом від 1 до 9. ```js async (getUserInput) => { @@ -190,7 +190,7 @@ async (getUserInput) => { }; ``` -The return value from the `POST` to `/api/check` will be an object containing a `valid` property, which is `true` if the number may be placed at the provided coordinate and `false` if the number may not. If false, the returned object will also contain a `conflict` property which is an array containing the strings `"row"`, `"column"`, and/or `"region"` depending on which makes the placement invalid. +Поверненим значенням запиту `POST` до `/api/check` буде об'єкт, який містить властивість `valid`, де `true` означає, що число можна розмістити на заданій координаті, та `false`, якщо ні. Якщо false, повернений об'єкт також міститиме властивість `conflict`, яка є масивом із рядками `"row"`, `"column"` та/або `"region"`, залежно від того, чому розміщення недійсне. ```js async (getUserInput) => { @@ -213,7 +213,7 @@ async (getUserInput) => { }; ``` -If `value` submitted to `/api/check` is already placed in `puzzle` on that `coordinate`, the returned value will be an object containing a `valid` property with `true` if `value` is not conflicting. +Якщо `value`, надіслане до `/api/check`, вже розміщене в `puzzle` на цій `coordinate`, поверненим значенням буде об'єкт, який містить властивість `valid` із `true`, якщо `value` не конфліктує. ```js async (getUserInput) => { @@ -232,7 +232,7 @@ async (getUserInput) => { }; ``` -If the puzzle submitted to `/api/check` contains values which are not numbers or periods, the returned value will be `{ error: 'Invalid characters in puzzle' }` +Якщо головоломка, надіслана до `/api/check`, містить символи, які не є числами або крапками, поверненим значенням буде `{ error: 'Invalid characters in puzzle' }` ```js async (getUserInput) => { @@ -252,7 +252,7 @@ async (getUserInput) => { }; ``` -If the puzzle submitted to `/api/check` is greater or less than 81 characters, the returned value will be `{ error: 'Expected puzzle to be 81 characters long' }` +Якщо головоломка, надіслана до `/api/check`, містить більше чи менше за 81 символ, поверненим значенням буде `{ error: 'Expected puzzle to be 81 characters long' }` ```js async (getUserInput) => { @@ -276,7 +276,7 @@ async (getUserInput) => { }; ``` -If the object submitted to `/api/check` is missing `puzzle`, `coordinate` or `value`, the returned value will be `{ error: 'Required field(s) missing' }` +Якщо об'єкт, надісланий до `/api/check`, не має `puzzle`, `coordinate` або `value`, поверненим значенням буде `{ error: 'Required field(s) missing' }` ```js async (getUserInput) => { @@ -308,7 +308,7 @@ async (getUserInput) => { }; ``` -If the coordinate submitted to `api/check` does not point to an existing grid cell, the returned value will be `{ error: 'Invalid coordinate'}` +Якщо координата, надіслана до `api/check`, не вказує на наявну клітинку сітки, поверненим значенням буде `{ error: 'Invalid coordinate'}` ```js async (getUserInput) => { @@ -330,7 +330,7 @@ async (getUserInput) => { }; ``` -If the `value` submitted to `/api/check` is not a number between 1 and 9, the returned value will be `{ error: 'Invalid value' }` +Якщо `value`, надіслане до `/api/check`, не є числом від 1 до 9, поверненим значенням буде `{ error: 'Invalid value' }` ```js async (getUserInput) => { @@ -352,7 +352,7 @@ async (getUserInput) => { }; ``` -Усі 12 модульних тестів завершено та успішно пройдено. See `/tests/1_unit-tests.js` for the expected behavior you should write tests for. +Усі 12 модульних тестів завершено та успішно пройдено. Перегляньте `/tests/1_unit-tests.js` очікуваної поведінки, для якої ви пишете тести. ```js async (getUserInput) => { @@ -377,7 +377,7 @@ async (getUserInput) => { }; ``` -Усі 14 функціональних тестів завершено та успішно пройдено. See `/tests/2_functional-tests.js` for the expected functionality you should write tests for. +Усі 14 функціональних тестів завершено та успішно пройдено. Перегляньте `/tests/2_functional-tests.js` функціональності, для якої ви пишете тести. ```js async (getUserInput) => { diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-camper-leaderboard.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-camper-leaderboard.md index d88bcd0257a..16bd925bcd6 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-camper-leaderboard.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-camper-leaderboard.md @@ -22,7 +22,7 @@ dashedName: build-a-freecodecamp-forum-homepage Коли ви завершили, додайте посилання на ваш проєкт на CodePen та натисніть кнопку "Я виконав це завдання". -You can get feedback on your project by sharing it on the freeCodeCamp forum. +Ви можете отримати фідбек до свого проєкту, поділившись ним на форумі freeCodeCamp. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-light-bright-app.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-light-bright-app.md index 9669048f2aa..ae5d3de186a 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-light-bright-app.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-light-bright-app.md @@ -28,7 +28,7 @@ dashedName: build-a-light-bright-app Коли ви завершили, додайте посилання на ваш проєкт на CodePen та натисніть кнопку "Я виконав це завдання". -You can get feedback on your project by sharing it on the freeCodeCamp forum. +Ви можете отримати фідбек до свого проєкту, поділившись ним на форумі freeCodeCamp. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-pinterest-clone.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-pinterest-clone.md index fca2f462fd5..406b50b2ea9 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-pinterest-clone.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-pinterest-clone.md @@ -28,7 +28,7 @@ dashedName: build-a-pinterest-clone Як тільки ви завершите імплементацію цих історій користувача, введіть URL-адресу вашого онлайн додатку і, за бажанням, вашого GitHub репозиторію. Тоді натисніть кнопку "Я завершив це завдання". -You can get feedback on your project by sharing it on the freeCodeCamp forum. +Ви можете отримати фідбек до свого проєкту, поділившись ним на форумі freeCodeCamp. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-pong-game.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-pong-game.md index 60f5ec0f99e..a5293c96bf8 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-pong-game.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-pong-game.md @@ -24,7 +24,7 @@ dashedName: build-a-pong-game Коли ви завершили, додайте посилання на ваш проєкт на CodePen та натисніть кнопку "Я виконав це завдання". -You can get feedback on your project by sharing it on the freeCodeCamp forum. +Ви можете отримати фідбек до свого проєкту, поділившись ним на форумі freeCodeCamp. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-recipe-box.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-recipe-box.md index 8352f09b60b..7b76cbf2294 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-recipe-box.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-recipe-box.md @@ -28,7 +28,7 @@ dashedName: build-a-recipe-box Коли ви завершили, додайте посилання на ваш проєкт на CodePen та натисніть кнопку "Я виконав це завдання". -You can get feedback on your project by sharing it on the freeCodeCamp forum. +Ви можете отримати фідбек до свого проєкту, поділившись ним на форумі freeCodeCamp. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-roguelike-dungeon-crawler-game.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-roguelike-dungeon-crawler-game.md index 38713f0c802..54cdd753c20 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-roguelike-dungeon-crawler-game.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-roguelike-dungeon-crawler-game.md @@ -32,7 +32,7 @@ dashedName: build-a-roguelike-dungeon-crawler-game Після виконання завдання, прикріпіть посилання на Ваш проєкт на CodePen і натисніть на кнопку "Я виконав(ла) це завдання". -You can get feedback on your project by sharing it on the freeCodeCamp forum. +Ви можете отримати фідбек до свого проєкту, поділившись ним на форумі freeCodeCamp. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-simon-game.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-simon-game.md index 8e2bd815af1..acb17bd4f43 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-simon-game.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-simon-game.md @@ -32,7 +32,7 @@ dashedName: build-a-simon-game Коли ви закінчите, прикріпіть посилання до вашого проєкту на CodePen і натисніть кнопку: "я виконав це завдання". -You can get feedback on your project by sharing it on the freeCodeCamp forum. +Ви можете отримати фідбек до свого проєкту, поділившись ним на форумі freeCodeCamp. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-tic-tac-toe-game.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-tic-tac-toe-game.md index 1168c6ed5db..de9eb775940 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-tic-tac-toe-game.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-tic-tac-toe-game.md @@ -20,7 +20,7 @@ dashedName: build-a-tic-tac-toe-game Після завершення додайте посилання на ваш проєкт на CodePen та натисніть на кнопку "Я виконав це завдання". -You can get feedback on your project by sharing it on the freeCodeCamp forum. +Ви можете отримати фідбек до свого проєкту, поділившись ним на форумі freeCodeCamp. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-wikipedia-viewer.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-wikipedia-viewer.md index 6b60955d66a..ba9de303cf6 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-wikipedia-viewer.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-wikipedia-viewer.md @@ -22,7 +22,7 @@ Using the MediaWiki API, replicate the search function and random article functi When you are finished, include a link to your project on CodePen and click the "I've completed this challenge" button. -You can get feedback on your project by sharing it on the freeCodeCamp forum. +Ви можете отримати фідбек до свого проєкту, поділившись ним на форумі freeCodeCamp. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-the-game-of-life.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-the-game-of-life.md index 5eea4be60be..ac071ac09cc 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-the-game-of-life.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-the-game-of-life.md @@ -37,7 +37,7 @@ At each step in time, the following transitions occur: When you are finished, include a link to your project and click the "I've completed this challenge" button. -You can get feedback on your project by sharing it on the freeCodeCamp forum. +Ви можете отримати фідбек до свого проєкту, поділившись ним на форумі freeCodeCamp. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/manage-a-book-trading-club.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/manage-a-book-trading-club.md index ff783e420ad..6bd625bce9a 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/manage-a-book-trading-club.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/manage-a-book-trading-club.md @@ -22,7 +22,7 @@ dashedName: manage-a-book-trading-club Як тільки ви закінчите реалізацію цих історій користувача, введіть URL-адресу вашого онлайн додатку і, за бажанням, вашого GitHub репозиторію. Тоді натисніть кнопку "Я завершив це завдання". -You can get feedback on your project by sharing it on the freeCodeCamp forum. +Ви можете отримати фідбек до свого проєкту, поділившись ним на форумі freeCodeCamp. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/map-data-across-the-globe.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/map-data-across-the-globe.md index 353a3cc1cda..247f811bc79 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/map-data-across-the-globe.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/map-data-across-the-globe.md @@ -22,7 +22,7 @@ dashedName: map-data-across-the-globe Коли ви завершили, додайте посилання на ваш проєкт на CodePen та натисніть кнопку "Я виконав це завдання". -You can get feedback on your project by sharing it on the freeCodeCamp forum. +Ви можете отримати фідбек до свого проєкту, поділившись ним на форумі freeCodeCamp. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/p2p-video-chat-application.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/p2p-video-chat-application.md index 0a99a6a36d7..ee617d75714 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/p2p-video-chat-application.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/p2p-video-chat-application.md @@ -32,7 +32,7 @@ dashedName: p2p-video-chat-application Як тільки ви виконаєте ці історії користувачів, введіть URL-адресу вашого онлайн додатку і, за можливості, вашого GitHub репозиторію. Тоді натисніть кнопку "Завдання виконано". -You can get feedback on your project by sharing it on the freeCodeCamp forum. +Ви можете отримати фідбек до свого проєкту, поділившись ним на форумі freeCodeCamp. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/show-national-contiguity-with-a-force-directed-graph.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/show-national-contiguity-with-a-force-directed-graph.md index 08f9b540b20..f9fd770ee18 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/show-national-contiguity-with-a-force-directed-graph.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/show-national-contiguity-with-a-force-directed-graph.md @@ -22,7 +22,7 @@ dashedName: show-national-contiguity-with-a-force-directed-graph Після завершення додайте посилання на ваш проєкт на CodePen та натисніть на кнопку "Завдання виконано". -You can get feedback on your project by sharing it on the freeCodeCamp forum. +Ви можете отримати фідбек до свого проєкту, поділившись ним на форумі freeCodeCamp. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/show-the-local-weather.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/show-the-local-weather.md index 1275914afbd..c62648026c6 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/show-the-local-weather.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/show-the-local-weather.md @@ -24,7 +24,7 @@ dashedName: show-the-local-weather Після завершення додайте посилання на ваш проєкт на CodePen та натисніть на кнопку "Завдання виконано". -You can get feedback on your project by sharing it on the freeCodeCamp forum. +Ви можете отримати фідбек до свого проєкту, поділившись ним на форумі freeCodeCamp. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/use-the-twitch-json-api.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/use-the-twitch-json-api.md index cb7b00b5cbd..7ac644bd07d 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/use-the-twitch-json-api.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/use-the-twitch-json-api.md @@ -26,7 +26,7 @@ The Twitch API is a RESTful API that lets developers build creative integrations Після завершення додайте посилання на ваш проєкт на CodePen та натисніть на кнопку "Завдання виконано". -You can get feedback on your project by sharing it on the freeCodeCamp forum. +Ви можете отримати фідбек до свого проєкту, поділившись ним на форумі freeCodeCamp. # --solutions-- diff --git a/curriculum/challenges/ukrainian/11-machine-learning-with-python/machine-learning-with-python-projects/book-recommendation-engine-using-knn.md b/curriculum/challenges/ukrainian/11-machine-learning-with-python/machine-learning-with-python-projects/book-recommendation-engine-using-knn.md index 2d0b73b9f3b..85576d0a8cf 100644 --- a/curriculum/challenges/ukrainian/11-machine-learning-with-python/machine-learning-with-python-projects/book-recommendation-engine-using-knn.md +++ b/curriculum/challenges/ukrainian/11-machine-learning-with-python/machine-learning-with-python-projects/book-recommendation-engine-using-knn.md @@ -20,7 +20,7 @@ dashedName: book-recommendation-engine-using-knn Ви будете використовувати набір даних Book-Crossings. Цей набір даних містить 1,1 млн рейтингів (за шкалою 1-10) 270 000 книжок від 90 000 користувачів. -Після імпортування та очищення даних використайте `NearestNeighbors` з `sklearn.neighbors`, щоб розробити модель, яка показує книжки, схожі на подану книжку. Алгоритм «Nearest Neighbors» вимірює відстань, щоб визначити «близькість» екземплярів. +Після імпортування та очищення даних використайте `NearestNeighbors` з `sklearn.neighbors`, щоб розробити модель, яка показує книжки, схожі на подану книжку. Алгоритм «Найближчого сусіда» вимірює відстань, щоб визначити «близькість» екземплярів. Створіть функцію під назвою `get_recommends`, яка приймає назву книжки (з набору даних) як аргумент та повертає список із 5 подібних книжок з відстанями до аргументу книжки.