diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/return-a-value-from-a-function-with-return.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/return-a-value-from-a-function-with-return.md index 418da705952..d8594e9786f 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/return-a-value-from-a-function-with-return.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/return-a-value-from-a-function-with-return.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244c2 -title: إرجاع قيمة من وظيفة (Return a Value from a Function with Return) +title: إنتاج قيمة من وظيفة (Function) challengeType: 1 videoUrl: 'https://scrimba.com/c/cy87wue' forumTopicId: 18271 @@ -9,7 +9,7 @@ dashedName: return-a-value-from-a-function-with-return # --description-- -يمكننا نقل القيم إلى وظيفة باستخدام حجج. يمكنك استخدام `return` لإرسال قيمة إلى خارج الوظيفة. +يمكننا نقل القيم إلى وظيفة باستخدام معطيات (arguments). يمكنك استخدام تعبير `return` للحصول على قيمة من وظيفة (function). **مثال** @@ -21,13 +21,13 @@ function plusThree(num) { const answer = plusThree(5); ``` -لدي `answer` القيمة `8` الآن. +يحتوي `answer` على قيمة `8`. -يأخذ `plusThree` من الحجج ما يقابل `num` وينتج قيمة تساوي `num + 3`. +يأخذ `plusThree` قيمة معطى من `num` وينتج قيمة تساوي `num + 3`. # --instructions-- -أنشئ وظيفة `timesFive` التي تقبل حجة واحد، وتضربه في `5`، وترجع القيمة الجديدة. +أنشئ الوظيفة `timesFive` التي تقبل معطى واحد، وتضربه في `5`، وتنتج قيمة جديدة. # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/complete-a-promise-with-resolve-and-reject.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/complete-a-promise-with-resolve-and-reject.md index 5ee27d3ed92..d6318ee1631 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/complete-a-promise-with-resolve-and-reject.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/complete-a-promise-with-resolve-and-reject.md @@ -8,7 +8,7 @@ dashedName: complete-a-promise-with-resolve-and-reject # --description-- -يكون للوعد (promise) ثلاث حالات: `pending`, و `fulfilled`, و `rejected`. كائن Promise الذي قمت بإنشائه في التحدي السابق معلق إلى الأبد في حالة `pending` لأنك لم تضف طريقة لإكمال كائن Promise. حجج `resolve` و `reject` المعطاة لوظفية الكائن promise تستخدم لفعل ذلك. تستخدم `resolve` عندما تريد أن ينجح الكائن promise وتستخدم `reject` عندما تريد أن يفشل الكائن promise. هذا الطرق تستقبل حَجَّة (argument)، كما هو مبين بالإدانة. +يكون للوعد (promise) ثلاث حالات: `pending`, و `fulfilled`, و `rejected`. كائن Promise الذي قمت بإنشائه في التحدي السابق معلق إلى الأبد في حالة `pending` لأنك لم تضف طريقة لإكمال كائن Promise. تستخدم الوسائط `resolve` و `reject` المعطاة لوظيفة الكائن promise لفعل ذلك. تستخدم `resolve` عندما تريد أن ينجح الكائن promise وتستخدم `reject` عندما تريد أن يفشل الكائن promise. هذا الطرق تستقبل حَجَّة (argument)، كما هو مبين بالإدانة. ```js const myPromise = new Promise((resolve, reject) => { diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance.md index 5b7b5c2eaf4..c37ada50d00 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance.md @@ -1,6 +1,6 @@ --- id: 587d7db1367417b2b2512b87 -title: إضافة الدوال بعد الميراث (Add Methods After Inheritance) +title: إضافة الطرق (Methods) بعد الميراث (Inheritance) challengeType: 1 forumTopicId: 301315 dashedName: add-methods-after-inheritance @@ -8,9 +8,9 @@ dashedName: add-methods-after-inheritance # --description-- -الوظيفة المنشئة (constructor function) التي ترث كائنها (object) يسمى `prototype` من وظيفة منشئة كبرى (supertype) يمكن أن يكون لها طرقها (methods) بالإضافة إلى الطرق الموروثة. +الوظيفة المنشئة (constructor function) التي ترث كائنها (object) تسمى `prototype` من وظيفة منشئة كبرى (supertype), يمكن أن تحتوي على طرقها (methods) بالإضافة إلى الطرق الموروثة. -على سبيل المثال، `Bird` هو منشئ (constructor) يرث `prototype` من `Animal`: +على سبيل المثال، يكون `Bird` منشئ (constructor) الذي يرث `prototype` من `Animal`: ```js function Animal() { } @@ -22,7 +22,7 @@ Bird.prototype = Object.create(Animal.prototype); Bird.prototype.constructor = Bird; ``` -بالإضافة إلى ما موروث من `Animal`، تريد إضافة سلوك فريد إلى كائنات (objects) المسمى `Bird`. هنا، `Bird` سيحصل على وظيفة (function) مسمى `fly()`. تضاف الوظائف إلى `prototype` في `Bird's` بنفس الطريقة مثل أي وظيفة منشئا (constructor function): +بالإضافة إلى ما موروث من `Animal`، تريد إضافة سلوك فريد إلى كائنات (objects) المسمى `Bird`. هنا، سيحصل `Bird` على وظيفة (function) مسمى `fly()`. تضاف الوظائف إلى `prototype` في `Bird's` بنفس الطريقة مثل أي وظيفة منشئا (constructor function): ```js Bird.prototype.fly = function() { @@ -42,41 +42,41 @@ duck.fly(); # --instructions-- -أضف كل الكود الضروري حتى يرث كائن `Dog` من `Animal` و عيّن المنشئ الخاص بـ `prototype` من `Dog` إلى `Dog`. ثم أضف `bark()` إلى الكائن `Dog` بحيث أن `beagle` يمكن أن يفعل `eat()` و `bark()`. يجب أن تطبع method الـ `bark()` الكلمة `Woof!` إلى وحدة التحكم. +أضف كل الكود الضروري حتى يرث كائن `Dog` من `Animal` و عيّن المنشئ الخاص بـ `prototype` من `Dog` بقيمة `Dog`. ثم أضف طريقة `bark()` إلى الكائن `Dog` بحيث أن `beagle` يمكن أن ينفذ `eat()` و `bark()`. يجب أن تطبع طريقة `bark()` كلمة `Woof!` إلى وحدة التحكم (console). # --hints-- -`Animal` لا يجب أن يستجيب لـ `bark()`. +يجب ألا `Animal` يستجيب إلى طريقة `bark()`. ```js assert(typeof Animal.prototype.bark == 'undefined'); ``` -`Dog` يجب أن يرث `eat()` من `Animal`. +يجب أن يرث `Dog` طريقة `eat()` من `Animal`. ```js assert(typeof Dog.prototype.eat == 'function'); ``` -يجب أن يحتوي prototype الـ `Dog` على `bark()`. +يجب أن يحتوي prototype داخل `Dog` على `bark()`. ```js assert('bark' in Dog.prototype); ``` -`beagle` يجب أن يكون `instanceof` من `Animal`. +يجب أن يكون `beagle` جزء (`instanceof`) من `Animal`. ```js assert(beagle instanceof Animal); ``` -يجب تعيين constructor الـ `beagle` إلى `Dog`. +يجب أن يكون منشئ `beagle` بقيمة `Dog`. ```js assert(beagle.constructor === Dog); ``` -`beagle.eat()` يجب أن يطبع السلسلة `nom nom nom` +يجب أن يطبع `beagle.eat()` مقطع نصي `nom nom nom` ```js capture(); @@ -85,7 +85,7 @@ uncapture(); assert(logOutput == 'nom nom nom'); ``` -`beagle.bark()` يجب ان يطبع السلسلة `Woof!` +يجب أن يطبع `beagle.bark()` مقطع نصي `Woof!` ```js capture(); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object.md index 16d268fdd75..b79ace14daa 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object.md @@ -1,6 +1,6 @@ --- id: 587d7dac367417b2b2512b74 -title: Use Dot Notation to Access the Properties of an Object +title: استخدام رمز النقطة (Dot Notation) للحصول على خصائص الكائن (Object) challengeType: 1 forumTopicId: 301333 dashedName: use-dot-notation-to-access-the-properties-of-an-object @@ -8,7 +8,7 @@ dashedName: use-dot-notation-to-access-the-properties-of-an-object # --description-- -أحدث التحدي الأخير object ذو خصائص مختلفة. الآن سترى كيفية الوصول إلى قيم هذه الخواص. إليك مثال: +أنشئ التحدي السابق كائن (object) ذو خصائص (properties) مختلفة. الآن سترى كيف تصل إلى قيم تلك الخصائص. إليك مثال: ```js let duck = { @@ -18,21 +18,21 @@ let duck = { console.log(duck.name); ``` -يتم استخدام تدوين Dot على اسم الكائن، `duck`، يليها اسم الخاصية، `name`، للوصول إلى قيمة `Aflac`. +تستخدم رمز النقطة (dot notation) على اسم الكائن `duck`، يليها اسم الخاصية `name`، للوصول إلى قيمة `Aflac`. # --instructions-- -قم بطباعة خواص كائن `dog` إلى وحدة التحكم الخاصة بك. +أطبع خواص كائن `dog` إلى وحدتك التحكم (console). # --hints-- -يجب أن يستخدم الكود الخاص بك `console.log` لطباعة قيمة خاصية `name` لكائن `dog`. +يجب أن يستخدم كودك `console.log` لطباعة قيمة خاصية `name` لكائن `dog`. ```js assert(/console.log\(.*dog\.name.*\)/g.test(code)); ``` -يجب أن يستخدم الكود الخاص بك `console.log` لطباعة قيمة خاصية `numLegs` لكائن `dog`. +يجب أن يستخدم كودك `console.log` لطباعة قيمة خاصية `numLegs` لكائن `dog`. ```js assert(/console.log\(.*dog\.numLegs.*\)/g.test(code)); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-inheritance-so-you-dont-repeat-yourself.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-inheritance-so-you-dont-repeat-yourself.md index 6445636bf59..9e6df4bc411 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-inheritance-so-you-dont-repeat-yourself.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-inheritance-so-you-dont-repeat-yourself.md @@ -1,6 +1,6 @@ --- id: 587d7db0367417b2b2512b83 -title: Use Inheritance So You Don't Repeat Yourself +title: استخدام التوريث (Inheritance) حتى لا تعيد تكرار نفسك (DRY) challengeType: 1 forumTopicId: 301334 dashedName: use-inheritance-so-you-dont-repeat-yourself @@ -8,9 +8,9 @@ dashedName: use-inheritance-so-you-dont-repeat-yourself # --description-- -هناك مبدأ في البرمجة يسمى Don't Repeat Yourself (DRY). السبب في أن الكود المتكرر مشكلة هو أن أي تغيير يتطلب إصلاح الكود في أماكن متعددة. وهذا يعني عادة المزيد من العمل للمبرمجين والمزيد من الحيز للأخطاء. +هناك مبدأ في البرمجة يسمى لا تكرر نقسك (Don't Repeat Yourself (DRY)). إن السبب وراء ضرر تكرار الكود هو أحتياج تعديل الكود في أماكن متعددة تغيير عند الرغبة بذلك. وعادة يضع هذا المزيد من العمل للمبرمجين ويزيد من احتمال وجود أخطاء. -لاحظ في المثال أدناه أن `describe` مشتركة من قبل `Bird` و `Dog`: +لاحظ في المثال أدناه إن `describe` مشتركة من قبل `Bird` و `Dog`: ```js Bird.prototype = { @@ -28,7 +28,7 @@ Dog.prototype = { }; ``` -يتم تكرار `describe` في مكانين. يمكن تعديل الكود لاتباع مبدأ DRY عن طريق إنشاء `supertype` (أو الاب) يسمى `Animal`: +يتم تكرار طريقة (method) المسمى `describe` في مكانين. يمكن تعديل الكود لاتباع مبدأ DRY عن طريق إنشاء `supertype` (أو حاوي (parent)) يسمى `Animal`: ```js function Animal() { }; @@ -41,7 +41,7 @@ Animal.prototype = { }; ``` -بما أن `Animal` يتضمن method الـ `describe` ، يمكنك إزالته من `Bird` و `Dog`: +عند أحتواء `Animal` على طريقة `describe`، يمكنك إزالتها من `Bird` و `Dog`: ```js Bird.prototype = { @@ -55,23 +55,23 @@ Dog.prototype = { # --instructions-- -يتم تكرار method الـ `eat` في كل من `Cat` و `Bear`. قم بتعديل الكود بروح DRY عن طريق نقل method الـ `eat` إلى `supertype` الـ `Animal`. +يتم تكرار طريقة `eat` في كل من `Cat` و `Bear`. عدل كود بهدف عدم تكرار نفسك (DRY) عن طريق نقل طريقة `eat` داخل `Animal` الذي يكون `supertype`. # --hints-- -`Animal.prototype` يجب أن تحتوي على خاصية `eat`. +يجب أن تحتوي `Animal.prototype` على خاصية `eat`. ```js assert(Animal.prototype.hasOwnProperty('eat')); ``` -`Bear.prototype` يجب ألا يحتوي على خاصية `eat`. +يجب ألا يحتوي `Bear.prototype` على خاصية `eat`. ```js assert(!Bear.prototype.hasOwnProperty('eat')); ``` -`Cat.prototype` يجب ألا تحتوي على خاصية `eat`. +يجب ألا تحتوي `Cat.prototype` على خاصية `eat`. ```js assert(!Cat.prototype.hasOwnProperty('eat')); diff --git a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md index 2515e3330ca..5f38653b8ba 100644 --- a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md +++ b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md @@ -9,7 +9,7 @@ dashedName: step-16 One of the most powerful tools is your developer console. Depending on your browser, this might be opened by pressing `F12` or `Ctrl+Shift+I`. You can also click the "Console" button above the preview window to see our built-in console. The developer console will include errors that are produced by your code, but you can also use it to see values of variables in your code, which is helpful for debugging. -Add a `console.log("Hello World");` line between your `script` tags, then click the "Console" button to open our console, and you should see the text `Hello World` in your console. +Add a `console.log("Hello World");` line between your `script` tags. Then click the "Console" button to open the console. You should see the text `Hello World`. Note how the line ends with a semi-colon. It is common practice in JavaScript to end your code lines with semi-colons. diff --git a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md index 1b122cb50c8..8db7f52b284 100644 --- a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md +++ b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md @@ -7,7 +7,7 @@ dashedName: step-32 # --description-- -Use `querySelector()` to get the other two button elements, using their `#button2` and `#button3` `id`s. Store them in variables called `button2` and `button3`. Remember to use `const`. +Use `querySelector()` to get the other two `button` elements using their `id`s: `button2` and `button3`. Store them in variables called `button2` and `button3`. Remember to use `const`. # --hints-- diff --git a/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md b/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md index dae351661e4..013c211cdc8 100644 --- a/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md +++ b/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md @@ -9,7 +9,7 @@ dashedName: step-16 你的開發者控制檯是最強大的工具之一。 根據你的瀏覽器不同,可能需要通過按 `F12` 或 `Ctrl+Shift+I` 來打開它。 也可以點擊預覽窗口上方的“控制檯”按鈕來查看我們的內置控制檯。 開發者控制檯將包含你的代碼產生的錯誤,但你也可以使用它來查看代碼中變量的值,這有助於調試。 -在 `script` 標籤之間添加 `console.log("Hello World");` 行,然後單擊 “Console” 按鈕打開我們的控制檯,你應該會看到文本 `Hello World` 在你的控制檯中。 +Add a `console.log("Hello World");` line between your `script` tags. Then click the "Console" button to open the console. You should see the text `Hello World`. 請注意該行如何以分號結尾。 JavaScript 中的常見做法是用分號結束代碼行。 diff --git a/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md b/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md index 1b122cb50c8..8db7f52b284 100644 --- a/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md +++ b/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md @@ -7,7 +7,7 @@ dashedName: step-32 # --description-- -Use `querySelector()` to get the other two button elements, using their `#button2` and `#button3` `id`s. Store them in variables called `button2` and `button3`. Remember to use `const`. +Use `querySelector()` to get the other two `button` elements using their `id`s: `button2` and `button3`. Store them in variables called `button2` and `button3`. Remember to use `const`. # --hints-- diff --git a/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md b/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md index aeb4e1339f4..49044f4e8a1 100644 --- a/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md +++ b/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md @@ -9,7 +9,7 @@ dashedName: step-16 你的开发者控制台是最强大的工具之一。 根据你的浏览器不同,可能需要通过按 `F12` 或 `Ctrl+Shift+I` 来打开它。 也可以点击预览窗口上方的“控制台”按钮来查看我们的内置控制台。 开发者控制台将包含你的代码产生的错误,但你也可以使用它来查看代码中变量的值,这有助于调试。 -在 `script` 标签之间添加 `console.log("Hello World");` 行,然后单击 “Console” 按钮打开我们的控制台,你应该会看到文本 `Hello World` 在你的控制台中。 +Add a `console.log("Hello World");` line between your `script` tags. Then click the "Console" button to open the console. You should see the text `Hello World`. 请注意该行如何以分号结尾。 JavaScript 中的常见做法是用分号结束代码行。 diff --git a/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md b/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md index 1b122cb50c8..8db7f52b284 100644 --- a/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md +++ b/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md @@ -7,7 +7,7 @@ dashedName: step-32 # --description-- -Use `querySelector()` to get the other two button elements, using their `#button2` and `#button3` `id`s. Store them in variables called `button2` and `button3`. Remember to use `const`. +Use `querySelector()` to get the other two `button` elements using their `id`s: `button2` and `button3`. Store them in variables called `button2` and `button3`. Remember to use `const`. # --hints-- diff --git a/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/create-new-middleware.md b/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/create-new-middleware.md index e3a3589cc57..2f878121244 100644 --- a/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/create-new-middleware.md +++ b/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/create-new-middleware.md @@ -8,11 +8,11 @@ dashedName: create-new-middleware # --description-- -As is, any user can just go to `/profile` whether they have authenticated or not by typing in the URL. You want to prevent this by checking if the user is authenticated first before rendering the profile page. Este es el ejemplo perfecto de cuándo crear un middleware. +Tal y como está, cualquier usuario puede simplemente ir a `/profile` se haya autenticado o no, escribiendo la url. Para evitar esto, comprueba si el usuario está autenticado antes de mostrar la página de perfil. Este es el ejemplo perfecto de cuándo crear un middleware. -The challenge here is creating the middleware function `ensureAuthenticated(req, res, next)`, which will check if a user is authenticated by calling Passport's `isAuthenticated` method on the `request` which checks if `req.user` is defined. If it is, then `next()` should be called. Otherwise, you can just respond to the request with a redirect to your homepage to login. +El reto aquí es crear la función de middleware `ensureAuthenticated(req, res, next)`, que comprobará si un usuario está autenticado llamando al método `isAuthenticated` de Passport sobre el `request` que comprueba si `req.user` está definido. Si lo es, entonces `next()` debe ser llamado. De lo contrario, puedes responder a la solicitud con una redirección a tu página de inicio para iniciar sesión. -An implementation of this middleware is: +Una implementación de este middleware es: ```javascript function ensureAuthenticated(req, res, next) { @@ -23,7 +23,7 @@ function ensureAuthenticated(req, res, next) { }; ``` -Create the above middleware function, then pass `ensureAuthenticated` as middleware to requests for the profile page before the argument to the GET request: +Crea la función middleware anterior y, luego, pasa `ensureAuthenticated` como middleware a las solicitudes para la página de perfil antes del argumento a la solicitud GET: ```javascript app @@ -33,11 +33,11 @@ app }); ``` -Submit your page when you think you've got it right. If you're running into errors, you can check out the project completed up to this point. +Envía tu página cuando creas que la has hecho bien. Si te encuentras con errores, puedes consultar el proyecto completado hasta este momento. # --hints-- -The middleware `ensureAuthenticated` should be implemented and attached to the `/profile` route. +El middleware `ensureAuthenticated` debe ser implementado y adjunto a la ruta `/profile`. ```js async (getUserInput) => { @@ -57,7 +57,7 @@ async (getUserInput) => { } ``` -An unauthenticated GET request to `/profile` should correctly redirect to `/`. +Una petición GET no autenticada a `/profile` debe redirigir correctamente a `/`. ```js async (getUserInput) => { diff --git a/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md b/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md index f2cd2d18978..281b3c7503a 100644 --- a/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md +++ b/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md @@ -9,7 +9,7 @@ dashedName: step-16 One of the most powerful tools is your developer console. Depending on your browser, this might be opened by pressing `F12` or `Ctrl+Shift+I`. You can also click the "Console" button above the preview window to see our built-in console. The developer console will include errors that are produced by your code, but you can also use it to see values of variables in your code, which is helpful for debugging. -Add a `console.log("Hello World");` line between your `script` tags, then click the "Console" button to open our console, and you should see the text `Hello World` in your console. +Add a `console.log("Hello World");` line between your `script` tags. Then click the "Console" button to open the console. You should see the text `Hello World`. Note how the line ends with a semi-colon. It is common practice in JavaScript to end your code lines with semi-colons. diff --git a/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md b/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md index c6d2d856198..652e4eff26f 100644 --- a/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md +++ b/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md @@ -7,7 +7,7 @@ dashedName: step-32 # --description-- -Use `querySelector()` to get the other two button elements, using their `#button2` and `#button3` `id`s. Store them in variables called `button2` and `button3`. Remember to use `const`. +Use `querySelector()` to get the other two `button` elements using their `id`s: `button2` and `button3`. Store them in variables called `button2` and `button3`. Remember to use `const`. # --hints-- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md index 2515e3330ca..5f38653b8ba 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md @@ -9,7 +9,7 @@ dashedName: step-16 One of the most powerful tools is your developer console. Depending on your browser, this might be opened by pressing `F12` or `Ctrl+Shift+I`. You can also click the "Console" button above the preview window to see our built-in console. The developer console will include errors that are produced by your code, but you can also use it to see values of variables in your code, which is helpful for debugging. -Add a `console.log("Hello World");` line between your `script` tags, then click the "Console" button to open our console, and you should see the text `Hello World` in your console. +Add a `console.log("Hello World");` line between your `script` tags. Then click the "Console" button to open the console. You should see the text `Hello World`. Note how the line ends with a semi-colon. It is common practice in JavaScript to end your code lines with semi-colons. diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md index 1b122cb50c8..8db7f52b284 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md @@ -7,7 +7,7 @@ dashedName: step-32 # --description-- -Use `querySelector()` to get the other two button elements, using their `#button2` and `#button3` `id`s. Store them in variables called `button2` and `button3`. Remember to use `const`. +Use `querySelector()` to get the other two `button` elements using their `id`s: `button2` and `button3`. Store them in variables called `button2` and `button3`. Remember to use `const`. # --hints-- diff --git a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md index 1d4ddf00f8c..e082d467597 100644 --- a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md +++ b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md @@ -1,7 +1,7 @@ --- id: 587d7b8a367417b2b2512b4c title: >- - Destructuring via rest elements + Destrutturazione tramite elementi rest challengeType: 1 forumTopicId: 301218 dashedName: >- @@ -22,11 +22,11 @@ console.log(arr); La console mostrerà i valori `1, 2` e `[3, 4, 5, 7]`. -Le variabili `a` e `b` prendono il primo e il secondo valore dall'array. After that, because of the rest syntax presence, `arr` gets the rest of the values in the form of an array. L'elemento di resto funziona correttamente solo come ultima variabile dell'elenco. As in, you cannot use the rest syntax to catch a subarray that leaves out the last element of the original array. +Le variabili `a` e `b` prendono il primo e il secondo valore dall'array. Dopodiché, a causa della presenza della sintassi rest, `arr` ottiene il resto dei valori sotto forma di un array. L'elemento di resto funziona correttamente solo come ultima variabile dell'elenco. Non è quindi possibile utilizzare la sintassi rest per raccogliere un sottoarray che lascia fuori l'ultimo elemento dell'array originale. # --instructions-- -Use a destructuring assignment with the rest syntax to emulate the behavior of `Array.prototype.slice()`. `removeFirstTwo()` dovrebbe restituire un sotto-array dell'array originario `list` con i primi due elementi omessi. +Usa un'assegnazione destrutturante con la sintassi rest per emulare il comportamento di `Array.prototype.slice()`. `removeFirstTwo()` dovrebbe restituire un sotto-array dell'array originario `list` con i primi due elementi omessi. # --hints-- diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md index 2b93d532f5f..9059ea1155f 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md @@ -9,7 +9,7 @@ dashedName: step-16 Uno degli strumenti più potenti è la tua console per sviluppatori. A seconda del browser, potrebbe aprirsi premendo `F12` o `Ctrl+Shift+I`. Puoi anche cliccare sul pulsante "Console" sopra la finestra di anteprima per vedere la nostra console integrata. La console per sviluppatori include gli errori generati dal tuo codice, ma puoi anche usarla per vedere i valori delle variabili nel codice, che è molto utile per il debugging. -Aggiungi la riga `console.log("Hello World");` tra i tag `script`, poi clicca sul pulsante "Console" per aprire la console, in cui dovresti vedere il testo `Hello World`. +Add a `console.log("Hello World");` line between your `script` tags. Then click the "Console" button to open the console. You should see the text `Hello World`. Nota come la riga termina con un punto e virgola. È un pratica comune in JavaScript terminare le righe di codice con un punto e virgola. diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md index ef53a815f34..946c7f95695 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md @@ -7,7 +7,7 @@ dashedName: step-32 # --description-- -Usa `querySelector()` per ottenere gli altri due elementi button usando i loro `id`, `#button2` e `#button3`. Conservali in variabili chiamate `button2` e `button3`. Ricorda di usare `const`. +Use `querySelector()` to get the other two `button` elements using their `id`s: `button2` and `button3`. Conservali in variabili chiamate `button2` e `button3`. Ricorda di usare `const`. # --hints-- diff --git a/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md b/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md index 2515e3330ca..5f38653b8ba 100644 --- a/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md +++ b/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md @@ -9,7 +9,7 @@ dashedName: step-16 One of the most powerful tools is your developer console. Depending on your browser, this might be opened by pressing `F12` or `Ctrl+Shift+I`. You can also click the "Console" button above the preview window to see our built-in console. The developer console will include errors that are produced by your code, but you can also use it to see values of variables in your code, which is helpful for debugging. -Add a `console.log("Hello World");` line between your `script` tags, then click the "Console" button to open our console, and you should see the text `Hello World` in your console. +Add a `console.log("Hello World");` line between your `script` tags. Then click the "Console" button to open the console. You should see the text `Hello World`. Note how the line ends with a semi-colon. It is common practice in JavaScript to end your code lines with semi-colons. diff --git a/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md b/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md index 1b122cb50c8..8db7f52b284 100644 --- a/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md +++ b/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md @@ -7,7 +7,7 @@ dashedName: step-32 # --description-- -Use `querySelector()` to get the other two button elements, using their `#button2` and `#button3` `id`s. Store them in variables called `button2` and `button3`. Remember to use `const`. +Use `querySelector()` to get the other two `button` elements using their `id`s: `button2` and `button3`. Store them in variables called `button2` and `button3`. Remember to use `const`. # --hints-- diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md index 311eef81e0a..2c1b352078b 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md @@ -1,7 +1,7 @@ --- id: 587d7b8a367417b2b2512b4c title: >- - Destructuring via rest elements + Desestruturação por meio de elementos com rest challengeType: 1 forumTopicId: 301218 dashedName: >- @@ -22,11 +22,11 @@ console.log(arr); O console exibiria os valores `1, 2` e `[3, 4, 5, 7]`. -As variáveis `a` e `b` pegam o primeiro e o segundo valores do array. After that, because of the rest syntax presence, `arr` gets the rest of the values in the form of an array. O elemento rest só funciona corretamente como a última variável na lista. As in, you cannot use the rest syntax to catch a subarray that leaves out the last element of the original array. +As variáveis `a` e `b` pegam o primeiro e o segundo valores do array. Depois disso, por causa da presença da sintaxe do rest, `arr` pega o resto dos valores na forma de um array. O elemento rest só funciona corretamente como a última variável na lista. De momento, você não pode usar a sintaxe do rest para capturar um sub-array que deixa de fora o último elemento do array original. # --instructions-- -Use a destructuring assignment with the rest syntax to emulate the behavior of `Array.prototype.slice()`. `removeFirstTwo()` deve retornar um sub-array do array original `list` com os dois primeiros elementos omitidos. +Use uma atribuição de desestruturação com a sintaxe do rest para simular o comportamento de `Array.prototype.slice()`. `removeFirstTwo()` deve retornar um sub-array do array original `list` com os dois primeiros elementos omitidos. # --hints-- diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md index e7425d7ab5d..7758e0b6b42 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md @@ -9,7 +9,7 @@ dashedName: step-16 Uma das ferramentas mais poderosas é o console do desenvolvedor. Dependendo do navegador, ele pode ser aberto pressionando `F12` ou `Ctrl+Shift+I`. Você também pode clicar no botão "Console" acima da janela de pré-visualização para ver o console embutido. O console do desenvolvedor incluirá erros produzidos pelo código, mas você também pode usá-lo para ver valores de variáveis no código, o que é útil para depuração. -Adicione a linha `console.log("Hello World");` entre as tags `script` e, em seguida, clique no botão "Console" para abrir o console, e você deve ver ali o texto `Hello World`. +Add a `console.log("Hello World");` line between your `script` tags. Then click the "Console" button to open the console. You should see the text `Hello World`. Observe como a linha termina com ponto e vírgula. É prática comum em JavaScript encerrar as linhas de código com ponto e vírgula. diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md index 1b5d0d31e09..f0e694b31c4 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md @@ -7,7 +7,7 @@ dashedName: step-32 # --description-- -Use `querySelector()` para obter os outros dois elementos de botão, usando os `id`s de `#button2` e de `#button3`. Armazene-os em variáveis chamadas `button2` e `button3`. Lembre-se de usar `const`. +Use `querySelector()` to get the other two `button` elements using their `id`s: `button2` and `button3`. Armazene-os em variáveis chamadas `button2` e `button3`. Lembre-se de usar `const`. # --hints-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/assigning-the-value-of-one-variable-to-another.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/assigning-the-value-of-one-variable-to-another.md index e1905821acd..ab793483eef 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/assigning-the-value-of-one-variable-to-another.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/assigning-the-value-of-one-variable-to-another.md @@ -1,6 +1,6 @@ --- id: 5ee127a03c3b35dd45426493 -title: Присвоєння значення однієї змінної іншій +title: Присвоєння значення однієї змінної до іншої challengeType: 1 videoUrl: '' forumTopicId: 418265 diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.md index 4fcc95b8d9f..cdd7a887b71 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.md @@ -9,7 +9,7 @@ dashedName: assignment-with-a-returned-value # --description-- -If you'll recall from our discussion about Storing Values with the Assignment Operator, everything to the right of the equal sign is resolved before the value is assigned. Це означає, що ми можемо взяти повернене значення функції та присвоїти його змінній. +Якщо пригадати з нашої розмови про збереження значень за допомогою оператора присвоєння, все, що знаходиться праворуч від знака рівності вирішено ще до того, як значення буде присвоєне. Це означає, що ми можемо взяти повернене значення функції та присвоїти його змінній. Припустимо, що ми вже визначили функцію `sum`, яка додає два числа, тоді: diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/count-backwards-with-a-for-loop.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/count-backwards-with-a-for-loop.md index 691b5956472..b2215982c59 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/count-backwards-with-a-for-loop.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/count-backwards-with-a-for-loop.md @@ -9,7 +9,7 @@ dashedName: count-backwards-with-a-for-loop # --description-- -Цикл for може здійснювати зворотній рахунок, якщо визначені правильні умови. +Цикл for може здійснювати зворотній рахунок, якщо ми визначимо правильні умови. Для того, щоб значення зменшувалось на два при кожній ітерації, потрібно змінити ініціалізацію, умову та кінцевий вираз. @@ -23,7 +23,7 @@ for (let i = 10; i > 0; i -= 2) { } ``` -Тепер `ourArray` міститиме `[10, 8, 6, 4, 2]`. Змінімо нашу ініціалізацію та кінцевий вираз і тоді ми зможемо відраховувати назад на два, щоб створити масив непарних чисел у порядку спадання. +Тепер `ourArray` міститиме `[10, 8, 6, 4, 2]`. Змінімо нашу ініціалізацію та кінцевий вираз, щоб ми могли рахувати у зворотньому напрямку по два та створити масив непарних чисел у порядку спадання. # --instructions-- @@ -31,19 +31,19 @@ for (let i = 10; i > 0; i -= 2) { # --hints-- -Для цього потрібно використовувати цикл `for`. +Ви повинні використати цикл `for`. ```js assert(/for\s*\([^)]+?\)/.test(code)); ``` -Потрібно використовувати метод масиву `push`. +Ви повинні використати метод масиву `push`. ```js assert(code.match(/myArray.push/)); ``` -`myArray` повинне дорівнювати `[9, 7, 5, 3, 1]`. +`myArray` повинен дорівнювати `[9, 7, 5, 3, 1]`. ```js assert.deepEqual(myArray, [9, 7, 5, 3, 1]); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/counting-cards.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/counting-cards.md index be26b93440c..7e802c16f9f 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/counting-cards.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/counting-cards.md @@ -9,7 +9,7 @@ dashedName: counting-cards # --description-- -In the casino game Blackjack, a player can determine whether they have an advantage on the next hand over the house by keeping track of the relative number of high and low cards remaining in the deck. This is called Card Counting. +В азартній грі «Блекджек» гравець може визначити, чи він має перевагу в наступній роздачі, відстежуючи кількість старших та молодших карт, що залишились в колоді. Це називається підрахунком карт. Чим більше старших карт у колоді, тим краще для гравця. Кожній карті присвоєно значення відповідно до нижчеподаної таблиці. Коли рахунок є більшим за нуль, гравець повинен ставити старшу карту. Коли рахунок дорівнює нулю або є меншим, гравець повинен ставити молодшу карту. diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/create-decimal-numbers-with-javascript.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/create-decimal-numbers-with-javascript.md index 3b32e51bd24..08931792c4c 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/create-decimal-numbers-with-javascript.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/create-decimal-numbers-with-javascript.md @@ -9,9 +9,9 @@ dashedName: create-decimal-numbers-with-javascript # --description-- -Ми можемо зберігати десяткові числа також і у змінних. Десяткові числа іноді називаються числами floating point або floats. +Десяткові числа також можна зберігати в змінних. Десяткові числа іноді називають числами з плаваючою крапкою або числами з рухомою крапкою. -**Note:** when you compute numbers, they are computed with finite precision. Operations using floating points may lead to different results than the desired outcome. If you are getting one of these results, open a topic on the freeCodeCamp forum. +**Примітка:** під час обчислення чисел вони обчислюються зі скінченною точністю. Операції з плаваючою крапкою можуть призвести до результатів, відмінних від бажаних. Якщо ви отримуєте один із цих результатів, поділіться на форумі freeCodeCamp. # --instructions-- @@ -19,13 +19,13 @@ dashedName: create-decimal-numbers-with-javascript # --hints-- -`myDecimal` повинне бути числом. +`myDecimal` повинна бути числом. ```js assert(typeof myDecimal === 'number'); ``` -`myDecimal` повинне мати десяткову кому +`myDecimal` повинна мати десяткову крапку ```js assert(myDecimal % 1 != 0); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md index 2d921cf6740..25c3c4dd9dc 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md @@ -9,7 +9,7 @@ dashedName: step-16 Одним із найпотужніших інструментів є ваша консоль розробника. Її можна відкрити за допомогою `F12` або `Ctrl+Shift+I`, залежно від вашого браузера. Ви також можете натиснути кнопку «Консоль» над вікном попереднього перегляду, щоб побачити нашу вбудовану консоль. Консоль розробника включатиме помилки, створені вашим кодом, але ви також можете використовувати її, щоб переглянути значення змінних у своєму коді, що корисно для налагодження. -Додайте рядок `console.log("Hello World");` між тегами `script`, потім натисніть кнопку «Консоль», щоб відкрити нашу консоль, та ви повинні побачити текст `Hello World` у своїй консолі. +Add a `console.log("Hello World");` line between your `script` tags. Then click the "Console" button to open the console. You should see the text `Hello World`. Зверніть увагу, що в кінці рядка крапка з комою. У JavaScript заведено закінчувати рядки коду крапкою з комою. diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md index 3bc51b48a51..3b024d6cf5e 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md @@ -7,7 +7,7 @@ dashedName: step-32 # --description-- -Використайте `querySelector()`, щоб отримати два інші елементи, використовуючи їхні `id` `#button2` та `#button3`. Розмістіть їх у змінних під назвою `button2` та `button3`. Не забудьте використати `const`. +Use `querySelector()` to get the other two `button` elements using their `id`s: `button2` and `button3`. Розмістіть їх у змінних під назвою `button2` та `button3`. Не забудьте використати `const`. # --hints--