diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md index 39f2c35a806..0e8fb9f65b6 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md @@ -39,23 +39,16 @@ assert(code.match(/\.slice/g)); assert(!code.match(/\.?[\s\S]*?splice/g)); ``` -يجب ألا تتغير مصفوفة `inputCities`. +You should not mutate the original array passed to the function. ```js -assert( - JSON.stringify(inputCities) === - JSON.stringify(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) -); +assert.deepEqual(_inputCities, ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]); ``` `nonMutatingSplice(["Chicago", "Delhi", "Islamabad", "London", "Berlin"])` يجب أن ترجع `["Chicago", "Delhi", "Islamabad"]`. ```js -assert( - JSON.stringify( - nonMutatingSplice(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) - ) === JSON.stringify(['Chicago', 'Delhi', 'Islamabad']) -); +assert.deepEqual(nonMutatingSplice(_inputCities), ["Chicago", "Delhi", "Islamabad"]); ``` # --seed-- @@ -64,14 +57,15 @@ assert( ```js function nonMutatingSplice(cities) { - // Only change code below this line + return cities.splice(3); - - // Only change code above this line } +``` -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; -nonMutatingSplice(inputCities); +## --after-user-code-- + +```js +const _inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` # --solutions-- @@ -80,5 +74,4 @@ nonMutatingSplice(inputCities); function nonMutatingSplice(cities) { return cities.slice(0,3); } -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` diff --git a/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-a.md b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-a.md new file mode 100644 index 00000000000..81cc2d54518 --- /dev/null +++ b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-a.md @@ -0,0 +1,45 @@ +--- +id: 64a5529c02815a7d323aab88 +title: The Box Model Question A +challengeType: 15 +dashedName: the-box-model-question-a +--- + +# --description-- + +Being able to inspect and debug your HTML and CSS is critical to frontend development. This lesson will take us through the Chrome Dev Tools, which allow you to see detailed information about your elements and CSS rules, as well as assist you in finding and fixing problems in your code. + +To open up the inspector, you can right-click on any element of a webpage and click “Inspect” or press F12. Go ahead and do that right now to see the HTML and CSS used on this page. + +Don’t get overwhelmed with all the tools you’re now seeing! For this lesson, we want to focus on the Elements and Styles panes. + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +Which panes should you focus on in the Chrome Dev Tools for inspecting and debugging HTML and CSS? + +## --answers-- + +Console and Network + +--- + +Elements and Styles + +--- + +Sources and Application + +--- + +Performance and Memory + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-b.md b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-b.md new file mode 100644 index 00000000000..c830844ef5e --- /dev/null +++ b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-b.md @@ -0,0 +1,42 @@ +--- +id: 64a553ed02815a7d323aab89 +title: The Box Model Question B +challengeType: 15 +dashedName: the-box-model-question-b +--- + +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --text-- + +When inspecting an element in the Chrome Dev Tools, if a style property is shown with a strikethrough, what does it indicate? + +## --answers-- + +The style property is currently disabled and not applied to the element. + +--- + +The style property is overridden by a more specific CSS rule. + +--- + +The style property is deprecated and should not be used. + +--- + +The style property is experimental and may not be supported by all browsers + +## --video-solution-- + +2 diff --git a/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-c.md b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-c.md new file mode 100644 index 00000000000..84cee19aea0 --- /dev/null +++ b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-c.md @@ -0,0 +1,46 @@ +--- +id: 64a5551d02815a7d323aab8a +title: The Box Model Question C +challengeType: 15 +dashedName: the-box-model-question-c +--- +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +Which feature in the Elements pane allows you to select any element on a webpage by hovering over it? + +## --answers-- + +Blue-highlighted icon + +--- + +Styles tab + +--- + +Inspector tab + +--- + +HTML structure view + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-d.md b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-d.md new file mode 100644 index 00000000000..4d882631471 --- /dev/null +++ b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-d.md @@ -0,0 +1,47 @@ +--- +id: 64a55a6102815a7d323aab8b +title: The Box Model Question D +challengeType: 15 +dashedName: the-box-model-question-d +--- +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +In the Styles pane, what information can you view about an element when it is selected? + +## --answers-- + +HTML structure and CSS rules + +--- + +Styles tab + +--- + +Inspector tab + +--- + +Applied styles and overwritten styles. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-e.md b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-e.md new file mode 100644 index 00000000000..7db2559056a --- /dev/null +++ b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-e.md @@ -0,0 +1,38 @@ +--- +id: 64a669f77a7d00f97013ed0c +title: The Box Model Question E +challengeType: 15 +dashedName: the-box-model-question-e +--- +# --description-- + +Now that you understand the basic syntax of HTML and CSS, we’re going to get serious. The most important skills you need to master with CSS are positioning and layout. Changing fonts and colors is a crucial skill, but being able to put things exactly where you want them on a webpage is even more crucial. After all, how many webpages can you find where absolutely every element is just stacked one on top of another? + +Learning to position elements on a webpage is not that difficult once you understand just a few key concepts. Unfortunately, many learners race through learning HTML and CSS to get to JavaScript and end up missing these fundamental concepts. This leads to frustration, pain, (and funny gifs) because all the JavaScript skills in the world are meaningless if you can’t stick your elements on the page where you need them to be. So with that in mind, let’s get started. + +# --question-- + +## --text-- + +Why is it important to have a solid understanding of CSS in web development? + +## --answers-- + +It allows you to create complex animations and interactive effects. + +--- + +It allows you to create complex animations and interactive effects. + +--- + +It helps in optimizing database queries for improved performance. + +--- + +It enables you to style and design webpages with precision and control. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-f.md b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-f.md new file mode 100644 index 00000000000..a91d049aee3 --- /dev/null +++ b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-f.md @@ -0,0 +1,49 @@ +--- +id: 64a66c917a7d00f97013ed0d +title: The Box Model Question F +challengeType: 15 +dashedName: the-box-model-question-f +--- +# --description-- + +The first important concept that you need to understand to be successful in CSS is the box model. It isn’t complicated, but skipping over it now will cause you much frustration down the line. + +Every single thing on a webpage is a rectangular box. These boxes can have other boxes in them and can sit alongside one another. You can get a rough idea of how this works by sticking a border on every item on the page like this: + +```css +* { + border: 1px solid red; +} +``` + + +# --question-- + +## --assignment-- + +Add a border to every element on the page and see how the boxes are laid out. + +## --text-- + +What is the fundamental concept in CSS that helps you understand the structure of elements as rectangular boxes? + +## --answers-- + +Box-sizing + +--- + +Box-shadow + +--- + +Box model + +--- + +Border-box + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-g.md b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-g.md new file mode 100644 index 00000000000..b8c981a7aa9 --- /dev/null +++ b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-g.md @@ -0,0 +1,52 @@ +--- +id: 64a6702e7a7d00f97013ed0e +title: The Box Model Question G +challengeType: 15 +dashedName: the-box-model-question-g +--- +# --description-- + +![lines](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/odin-lined.png) + +OK, so there might be some circles in the above image… but when it comes to layout, they fit together like rectangular boxes and not circles. In the end, laying out a webpage and positioning all its elements is deciding how you are going to nest and stack these boxes. + +The only real complication here is that there are many ways to manipulate the size of these boxes, and the space between them, using padding, margin, and border. But to sum it up briefly: + +- `padding` increases the space between the border of a box and the content of the box. +- `margin` increases the space between the borders of a box and the borders of adjacent boxes. +- `border` adds space (even if it’s only a pixel or two) between the margin and the padding. + +Be sure to study the diagrams carefully. + +![the box model](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/box-model.png) + +# --question-- + +## --assignment-- + +Add a border to every element on the page and see how the boxes are laid out. + +## --text-- + +From inside to outside, what is the order of box-model properties? + +## --answers-- + +Content, Margin, Padding, Border + +--- + +Margin, Padding, Content, Border + +--- + +Content, Padding, Border, Margin + +--- + +Padding, Content, Border, Margin + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-h.md b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-h.md new file mode 100644 index 00000000000..3c711550b34 --- /dev/null +++ b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-h.md @@ -0,0 +1,37 @@ +--- +id: 64a674937a7d00f97013ed0f +videoId: rIO5326FgPE +title: The Box Model Question H +challengeType: 15 +dashedName: the-box-model-question-h +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +What does the box-sizing CSS property do? + +## --answers-- + +It determines the order of the box-model properties. + +--- + +It specifies the position of an element on the webpage. + +--- + +It controls how the total width and height of an element are calculated. + +--- + +It sets the background color of an element. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-i.md b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-i.md new file mode 100644 index 00000000000..026ca2c2034 --- /dev/null +++ b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-i.md @@ -0,0 +1,36 @@ +--- +id: 64a6749a7a7d00f97013ed10 +videoId: rIO5326FgPE +title: The Box Model Question I +challengeType: 15 +dashedName: the-box-model-question-i +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +What is the difference between the standard and alternative box model? + +## --answers-- + +The standard box model calculates the width and height of an element based on the content alone, while the alternative box model calculates based on the content plus padding and border. + +--- + +The standard box model includes content, padding, and border, while the alternative box model includes only the content. + +--- + +The standard box model and the alternative box model are the same and have no differences. + +--- + +The standard box model includes only the content, while the alternative box model includes content, padding, and border. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-j.md b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-j.md new file mode 100644 index 00000000000..990fedec175 --- /dev/null +++ b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-j.md @@ -0,0 +1,37 @@ +--- +id: 64a674a47a7d00f97013ed11 +videoId: rIO5326FgPE +title: The Box Model Question J +challengeType: 15 +dashedName: the-box-model-question-j +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Would you use margin or padding to create more space between 2 elements? + +## --answers-- + +Padding + +--- + +Both margin and padding can be used interchangeably + +--- + +Neither margin nor padding can be used to create more space between elements + +--- + +Margin + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-k.md b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-k.md new file mode 100644 index 00000000000..933a01523c2 --- /dev/null +++ b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-k.md @@ -0,0 +1,36 @@ +--- +id: 64a674ac7a7d00f97013ed12 +videoId: rIO5326FgPE +title: The Box Model Question K +challengeType: 15 +dashedName: the-box-model-question-k +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Which CSS property would you use to create more space between the contents of an element and its border? + +## --answers-- + +Margin + +--- + +Padding + +--- + +Border + +--- + +Float + +## --video-solution-- + +2 diff --git a/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-l.md b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-l.md new file mode 100644 index 00000000000..80dfdc527af --- /dev/null +++ b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-l.md @@ -0,0 +1,28 @@ +--- +id: 64a674b97a7d00f97013ed13 +videoId: rIO5326FgPE +title: The Box Model Question L +challengeType: 15 +dashedName: the-box-model-question-l +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Would you use margin or padding if you wanted two elements to overlap each other? + +## --answers-- + +Padding + +--- + +Margin + +## --video-solution-- + +2 diff --git a/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-m.md b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-m.md new file mode 100644 index 00000000000..c55213cfd1b --- /dev/null +++ b/curriculum/challenges/arabic/16-the-odin-project/top-the-box-model/the-box-model-question-m.md @@ -0,0 +1,67 @@ +--- +id: 64a674c27a7d00f97013ed14 +videoId: rIO5326FgPE +title: The Box Model Question M +challengeType: 15 +dashedName: the-box-model-question-m +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +How do you set the alternative box model for all of your elements? + +## --answers-- + +```css +html { + box-sizing: inherit; +} +*, +*::before, +*::after { + box-sizing: border-box; +} +``` + +--- + +```css +* { + box-sizing: border-box; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +* { + box-sizing: inherit; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +*, +*::before, +*::after { + box-sizing: inherit; +} +``` + + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/arabic/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md b/curriculum/challenges/arabic/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md index 9793d760c20..93e60e4d425 100644 --- a/curriculum/challenges/arabic/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md +++ b/curriculum/challenges/arabic/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md @@ -62,5 +62,70 @@ doubleBasePalindromes(1000000); # --solutions-- ```js -// solution required +function buildPalindromesBase10(len) { + // Base cases + const palindromes = []; + if (len > 0) { + palindromes.push([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]); + } + if (len > 1) { + palindromes.push([11, 22, 33, 44, 55, 66, 77, 88, 99, 0]); + } + + for (let i = 3; i <= len; i++) { + const lengthIPalindromes = []; + + for (let j = 1; j < 10; j++) { + const firstDigit = j * (10 ** (i - 1)); + const lastDigit = j; + // Build off of palindromes 2 digits shorter + { + const shorterPalindromes = palindromes[i - 3]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 10 + lastDigit); + } + } + // Build off of palindromes 4 digits shorter + if (i > 4) { + const shorterPalindromes = palindromes[i - 5]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 100 + lastDigit); + } + } + } + palindromes.push(lengthIPalindromes); + } + return palindromes.flat(); +} + +function isPalindrome(num) { + const numAsString = num.toString(); + const numDigits = numAsString.length; + for (let i = 0; i < numDigits / 2; i++) { + if (numAsString[i] !== numAsString[numDigits - 1 - i]) { + return false; + } + } + return true; +} + +function isPalindromeBase2(num) { + return isPalindrome(num.toString(2)); +} + +function doubleBasePalindromes(n) { + let palindromeSum = 0; + const maxDigits = Math.ceil(Math.log10(n)); + const palindromesBase10 = buildPalindromesBase10(maxDigits); + + // Loop over all palindromes less than n + for (let i = 0; i < palindromesBase10.length && palindromesBase10[i] < n; i++) { + if (isPalindromeBase2(palindromesBase10[i])) { + palindromeSum += palindromesBase10[i]; + } + } + return palindromeSum; +} ``` diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md index 021e6b4b212..b43097821fd 100644 --- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md +++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md @@ -39,23 +39,16 @@ assert(code.match(/\.slice/g)); assert(!code.match(/\.?[\s\S]*?splice/g)); ``` -不能改變 `inputCities` 數組。 +You should not mutate the original array passed to the function. ```js -assert( - JSON.stringify(inputCities) === - JSON.stringify(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) -); +assert.deepEqual(_inputCities, ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]); ``` `nonMutatingSplice(["Chicago", "Delhi", "Islamabad", "London", "Berlin"])` 應返回 `["Chicago", "Delhi", "Islamabad"]`。 ```js -assert( - JSON.stringify( - nonMutatingSplice(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) - ) === JSON.stringify(['Chicago', 'Delhi', 'Islamabad']) -); +assert.deepEqual(nonMutatingSplice(_inputCities), ["Chicago", "Delhi", "Islamabad"]); ``` # --seed-- @@ -64,14 +57,15 @@ assert( ```js function nonMutatingSplice(cities) { - // Only change code below this line + return cities.splice(3); - - // Only change code above this line } +``` -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; -nonMutatingSplice(inputCities); +## --after-user-code-- + +```js +const _inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` # --solutions-- @@ -80,5 +74,4 @@ nonMutatingSplice(inputCities); function nonMutatingSplice(cities) { return cities.slice(0,3); } -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` diff --git a/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-a.md b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-a.md new file mode 100644 index 00000000000..81cc2d54518 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-a.md @@ -0,0 +1,45 @@ +--- +id: 64a5529c02815a7d323aab88 +title: The Box Model Question A +challengeType: 15 +dashedName: the-box-model-question-a +--- + +# --description-- + +Being able to inspect and debug your HTML and CSS is critical to frontend development. This lesson will take us through the Chrome Dev Tools, which allow you to see detailed information about your elements and CSS rules, as well as assist you in finding and fixing problems in your code. + +To open up the inspector, you can right-click on any element of a webpage and click “Inspect” or press F12. Go ahead and do that right now to see the HTML and CSS used on this page. + +Don’t get overwhelmed with all the tools you’re now seeing! For this lesson, we want to focus on the Elements and Styles panes. + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +Which panes should you focus on in the Chrome Dev Tools for inspecting and debugging HTML and CSS? + +## --answers-- + +Console and Network + +--- + +Elements and Styles + +--- + +Sources and Application + +--- + +Performance and Memory + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-b.md b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-b.md new file mode 100644 index 00000000000..c830844ef5e --- /dev/null +++ b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-b.md @@ -0,0 +1,42 @@ +--- +id: 64a553ed02815a7d323aab89 +title: The Box Model Question B +challengeType: 15 +dashedName: the-box-model-question-b +--- + +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --text-- + +When inspecting an element in the Chrome Dev Tools, if a style property is shown with a strikethrough, what does it indicate? + +## --answers-- + +The style property is currently disabled and not applied to the element. + +--- + +The style property is overridden by a more specific CSS rule. + +--- + +The style property is deprecated and should not be used. + +--- + +The style property is experimental and may not be supported by all browsers + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-c.md b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-c.md new file mode 100644 index 00000000000..84cee19aea0 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-c.md @@ -0,0 +1,46 @@ +--- +id: 64a5551d02815a7d323aab8a +title: The Box Model Question C +challengeType: 15 +dashedName: the-box-model-question-c +--- +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +Which feature in the Elements pane allows you to select any element on a webpage by hovering over it? + +## --answers-- + +Blue-highlighted icon + +--- + +Styles tab + +--- + +Inspector tab + +--- + +HTML structure view + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-d.md b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-d.md new file mode 100644 index 00000000000..4d882631471 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-d.md @@ -0,0 +1,47 @@ +--- +id: 64a55a6102815a7d323aab8b +title: The Box Model Question D +challengeType: 15 +dashedName: the-box-model-question-d +--- +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +In the Styles pane, what information can you view about an element when it is selected? + +## --answers-- + +HTML structure and CSS rules + +--- + +Styles tab + +--- + +Inspector tab + +--- + +Applied styles and overwritten styles. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-e.md b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-e.md new file mode 100644 index 00000000000..7db2559056a --- /dev/null +++ b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-e.md @@ -0,0 +1,38 @@ +--- +id: 64a669f77a7d00f97013ed0c +title: The Box Model Question E +challengeType: 15 +dashedName: the-box-model-question-e +--- +# --description-- + +Now that you understand the basic syntax of HTML and CSS, we’re going to get serious. The most important skills you need to master with CSS are positioning and layout. Changing fonts and colors is a crucial skill, but being able to put things exactly where you want them on a webpage is even more crucial. After all, how many webpages can you find where absolutely every element is just stacked one on top of another? + +Learning to position elements on a webpage is not that difficult once you understand just a few key concepts. Unfortunately, many learners race through learning HTML and CSS to get to JavaScript and end up missing these fundamental concepts. This leads to frustration, pain, (and funny gifs) because all the JavaScript skills in the world are meaningless if you can’t stick your elements on the page where you need them to be. So with that in mind, let’s get started. + +# --question-- + +## --text-- + +Why is it important to have a solid understanding of CSS in web development? + +## --answers-- + +It allows you to create complex animations and interactive effects. + +--- + +It allows you to create complex animations and interactive effects. + +--- + +It helps in optimizing database queries for improved performance. + +--- + +It enables you to style and design webpages with precision and control. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-f.md b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-f.md new file mode 100644 index 00000000000..a91d049aee3 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-f.md @@ -0,0 +1,49 @@ +--- +id: 64a66c917a7d00f97013ed0d +title: The Box Model Question F +challengeType: 15 +dashedName: the-box-model-question-f +--- +# --description-- + +The first important concept that you need to understand to be successful in CSS is the box model. It isn’t complicated, but skipping over it now will cause you much frustration down the line. + +Every single thing on a webpage is a rectangular box. These boxes can have other boxes in them and can sit alongside one another. You can get a rough idea of how this works by sticking a border on every item on the page like this: + +```css +* { + border: 1px solid red; +} +``` + + +# --question-- + +## --assignment-- + +Add a border to every element on the page and see how the boxes are laid out. + +## --text-- + +What is the fundamental concept in CSS that helps you understand the structure of elements as rectangular boxes? + +## --answers-- + +Box-sizing + +--- + +Box-shadow + +--- + +Box model + +--- + +Border-box + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-g.md b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-g.md new file mode 100644 index 00000000000..b8c981a7aa9 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-g.md @@ -0,0 +1,52 @@ +--- +id: 64a6702e7a7d00f97013ed0e +title: The Box Model Question G +challengeType: 15 +dashedName: the-box-model-question-g +--- +# --description-- + +![lines](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/odin-lined.png) + +OK, so there might be some circles in the above image… but when it comes to layout, they fit together like rectangular boxes and not circles. In the end, laying out a webpage and positioning all its elements is deciding how you are going to nest and stack these boxes. + +The only real complication here is that there are many ways to manipulate the size of these boxes, and the space between them, using padding, margin, and border. But to sum it up briefly: + +- `padding` increases the space between the border of a box and the content of the box. +- `margin` increases the space between the borders of a box and the borders of adjacent boxes. +- `border` adds space (even if it’s only a pixel or two) between the margin and the padding. + +Be sure to study the diagrams carefully. + +![the box model](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/box-model.png) + +# --question-- + +## --assignment-- + +Add a border to every element on the page and see how the boxes are laid out. + +## --text-- + +From inside to outside, what is the order of box-model properties? + +## --answers-- + +Content, Margin, Padding, Border + +--- + +Margin, Padding, Content, Border + +--- + +Content, Padding, Border, Margin + +--- + +Padding, Content, Border, Margin + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-h.md b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-h.md new file mode 100644 index 00000000000..3c711550b34 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-h.md @@ -0,0 +1,37 @@ +--- +id: 64a674937a7d00f97013ed0f +videoId: rIO5326FgPE +title: The Box Model Question H +challengeType: 15 +dashedName: the-box-model-question-h +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +What does the box-sizing CSS property do? + +## --answers-- + +It determines the order of the box-model properties. + +--- + +It specifies the position of an element on the webpage. + +--- + +It controls how the total width and height of an element are calculated. + +--- + +It sets the background color of an element. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-i.md b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-i.md new file mode 100644 index 00000000000..026ca2c2034 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-i.md @@ -0,0 +1,36 @@ +--- +id: 64a6749a7a7d00f97013ed10 +videoId: rIO5326FgPE +title: The Box Model Question I +challengeType: 15 +dashedName: the-box-model-question-i +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +What is the difference between the standard and alternative box model? + +## --answers-- + +The standard box model calculates the width and height of an element based on the content alone, while the alternative box model calculates based on the content plus padding and border. + +--- + +The standard box model includes content, padding, and border, while the alternative box model includes only the content. + +--- + +The standard box model and the alternative box model are the same and have no differences. + +--- + +The standard box model includes only the content, while the alternative box model includes content, padding, and border. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-j.md b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-j.md new file mode 100644 index 00000000000..990fedec175 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-j.md @@ -0,0 +1,37 @@ +--- +id: 64a674a47a7d00f97013ed11 +videoId: rIO5326FgPE +title: The Box Model Question J +challengeType: 15 +dashedName: the-box-model-question-j +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Would you use margin or padding to create more space between 2 elements? + +## --answers-- + +Padding + +--- + +Both margin and padding can be used interchangeably + +--- + +Neither margin nor padding can be used to create more space between elements + +--- + +Margin + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-k.md b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-k.md new file mode 100644 index 00000000000..933a01523c2 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-k.md @@ -0,0 +1,36 @@ +--- +id: 64a674ac7a7d00f97013ed12 +videoId: rIO5326FgPE +title: The Box Model Question K +challengeType: 15 +dashedName: the-box-model-question-k +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Which CSS property would you use to create more space between the contents of an element and its border? + +## --answers-- + +Margin + +--- + +Padding + +--- + +Border + +--- + +Float + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-l.md b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-l.md new file mode 100644 index 00000000000..80dfdc527af --- /dev/null +++ b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-l.md @@ -0,0 +1,28 @@ +--- +id: 64a674b97a7d00f97013ed13 +videoId: rIO5326FgPE +title: The Box Model Question L +challengeType: 15 +dashedName: the-box-model-question-l +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Would you use margin or padding if you wanted two elements to overlap each other? + +## --answers-- + +Padding + +--- + +Margin + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-m.md b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-m.md new file mode 100644 index 00000000000..c55213cfd1b --- /dev/null +++ b/curriculum/challenges/chinese-traditional/16-the-odin-project/top-the-box-model/the-box-model-question-m.md @@ -0,0 +1,67 @@ +--- +id: 64a674c27a7d00f97013ed14 +videoId: rIO5326FgPE +title: The Box Model Question M +challengeType: 15 +dashedName: the-box-model-question-m +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +How do you set the alternative box model for all of your elements? + +## --answers-- + +```css +html { + box-sizing: inherit; +} +*, +*::before, +*::after { + box-sizing: border-box; +} +``` + +--- + +```css +* { + box-sizing: border-box; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +* { + box-sizing: inherit; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +*, +*::before, +*::after { + box-sizing: inherit; +} +``` + + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/chinese-traditional/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md b/curriculum/challenges/chinese-traditional/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md index 9793d760c20..93e60e4d425 100644 --- a/curriculum/challenges/chinese-traditional/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md +++ b/curriculum/challenges/chinese-traditional/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md @@ -62,5 +62,70 @@ doubleBasePalindromes(1000000); # --solutions-- ```js -// solution required +function buildPalindromesBase10(len) { + // Base cases + const palindromes = []; + if (len > 0) { + palindromes.push([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]); + } + if (len > 1) { + palindromes.push([11, 22, 33, 44, 55, 66, 77, 88, 99, 0]); + } + + for (let i = 3; i <= len; i++) { + const lengthIPalindromes = []; + + for (let j = 1; j < 10; j++) { + const firstDigit = j * (10 ** (i - 1)); + const lastDigit = j; + // Build off of palindromes 2 digits shorter + { + const shorterPalindromes = palindromes[i - 3]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 10 + lastDigit); + } + } + // Build off of palindromes 4 digits shorter + if (i > 4) { + const shorterPalindromes = palindromes[i - 5]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 100 + lastDigit); + } + } + } + palindromes.push(lengthIPalindromes); + } + return palindromes.flat(); +} + +function isPalindrome(num) { + const numAsString = num.toString(); + const numDigits = numAsString.length; + for (let i = 0; i < numDigits / 2; i++) { + if (numAsString[i] !== numAsString[numDigits - 1 - i]) { + return false; + } + } + return true; +} + +function isPalindromeBase2(num) { + return isPalindrome(num.toString(2)); +} + +function doubleBasePalindromes(n) { + let palindromeSum = 0; + const maxDigits = Math.ceil(Math.log10(n)); + const palindromesBase10 = buildPalindromesBase10(maxDigits); + + // Loop over all palindromes less than n + for (let i = 0; i < palindromesBase10.length && palindromesBase10[i] < n; i++) { + if (isPalindromeBase2(palindromesBase10[i])) { + palindromeSum += palindromesBase10[i]; + } + } + return palindromeSum; +} ``` diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md index 722b2349078..9022ea6273f 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md @@ -39,23 +39,16 @@ assert(code.match(/\.slice/g)); assert(!code.match(/\.?[\s\S]*?splice/g)); ``` -不能改变 `inputCities` 数组。 +You should not mutate the original array passed to the function. ```js -assert( - JSON.stringify(inputCities) === - JSON.stringify(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) -); +assert.deepEqual(_inputCities, ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]); ``` `nonMutatingSplice(["Chicago", "Delhi", "Islamabad", "London", "Berlin"])` 应返回 `["Chicago", "Delhi", "Islamabad"]`。 ```js -assert( - JSON.stringify( - nonMutatingSplice(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) - ) === JSON.stringify(['Chicago', 'Delhi', 'Islamabad']) -); +assert.deepEqual(nonMutatingSplice(_inputCities), ["Chicago", "Delhi", "Islamabad"]); ``` # --seed-- @@ -64,14 +57,15 @@ assert( ```js function nonMutatingSplice(cities) { - // Only change code below this line + return cities.splice(3); - - // Only change code above this line } +``` -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; -nonMutatingSplice(inputCities); +## --after-user-code-- + +```js +const _inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` # --solutions-- @@ -80,5 +74,4 @@ nonMutatingSplice(inputCities); function nonMutatingSplice(cities) { return cities.slice(0,3); } -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` diff --git a/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-a.md b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-a.md new file mode 100644 index 00000000000..81cc2d54518 --- /dev/null +++ b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-a.md @@ -0,0 +1,45 @@ +--- +id: 64a5529c02815a7d323aab88 +title: The Box Model Question A +challengeType: 15 +dashedName: the-box-model-question-a +--- + +# --description-- + +Being able to inspect and debug your HTML and CSS is critical to frontend development. This lesson will take us through the Chrome Dev Tools, which allow you to see detailed information about your elements and CSS rules, as well as assist you in finding and fixing problems in your code. + +To open up the inspector, you can right-click on any element of a webpage and click “Inspect” or press F12. Go ahead and do that right now to see the HTML and CSS used on this page. + +Don’t get overwhelmed with all the tools you’re now seeing! For this lesson, we want to focus on the Elements and Styles panes. + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +Which panes should you focus on in the Chrome Dev Tools for inspecting and debugging HTML and CSS? + +## --answers-- + +Console and Network + +--- + +Elements and Styles + +--- + +Sources and Application + +--- + +Performance and Memory + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-b.md b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-b.md new file mode 100644 index 00000000000..c830844ef5e --- /dev/null +++ b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-b.md @@ -0,0 +1,42 @@ +--- +id: 64a553ed02815a7d323aab89 +title: The Box Model Question B +challengeType: 15 +dashedName: the-box-model-question-b +--- + +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --text-- + +When inspecting an element in the Chrome Dev Tools, if a style property is shown with a strikethrough, what does it indicate? + +## --answers-- + +The style property is currently disabled and not applied to the element. + +--- + +The style property is overridden by a more specific CSS rule. + +--- + +The style property is deprecated and should not be used. + +--- + +The style property is experimental and may not be supported by all browsers + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-c.md b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-c.md new file mode 100644 index 00000000000..84cee19aea0 --- /dev/null +++ b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-c.md @@ -0,0 +1,46 @@ +--- +id: 64a5551d02815a7d323aab8a +title: The Box Model Question C +challengeType: 15 +dashedName: the-box-model-question-c +--- +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +Which feature in the Elements pane allows you to select any element on a webpage by hovering over it? + +## --answers-- + +Blue-highlighted icon + +--- + +Styles tab + +--- + +Inspector tab + +--- + +HTML structure view + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-d.md b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-d.md new file mode 100644 index 00000000000..4d882631471 --- /dev/null +++ b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-d.md @@ -0,0 +1,47 @@ +--- +id: 64a55a6102815a7d323aab8b +title: The Box Model Question D +challengeType: 15 +dashedName: the-box-model-question-d +--- +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +In the Styles pane, what information can you view about an element when it is selected? + +## --answers-- + +HTML structure and CSS rules + +--- + +Styles tab + +--- + +Inspector tab + +--- + +Applied styles and overwritten styles. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-e.md b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-e.md new file mode 100644 index 00000000000..7db2559056a --- /dev/null +++ b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-e.md @@ -0,0 +1,38 @@ +--- +id: 64a669f77a7d00f97013ed0c +title: The Box Model Question E +challengeType: 15 +dashedName: the-box-model-question-e +--- +# --description-- + +Now that you understand the basic syntax of HTML and CSS, we’re going to get serious. The most important skills you need to master with CSS are positioning and layout. Changing fonts and colors is a crucial skill, but being able to put things exactly where you want them on a webpage is even more crucial. After all, how many webpages can you find where absolutely every element is just stacked one on top of another? + +Learning to position elements on a webpage is not that difficult once you understand just a few key concepts. Unfortunately, many learners race through learning HTML and CSS to get to JavaScript and end up missing these fundamental concepts. This leads to frustration, pain, (and funny gifs) because all the JavaScript skills in the world are meaningless if you can’t stick your elements on the page where you need them to be. So with that in mind, let’s get started. + +# --question-- + +## --text-- + +Why is it important to have a solid understanding of CSS in web development? + +## --answers-- + +It allows you to create complex animations and interactive effects. + +--- + +It allows you to create complex animations and interactive effects. + +--- + +It helps in optimizing database queries for improved performance. + +--- + +It enables you to style and design webpages with precision and control. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-f.md b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-f.md new file mode 100644 index 00000000000..a91d049aee3 --- /dev/null +++ b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-f.md @@ -0,0 +1,49 @@ +--- +id: 64a66c917a7d00f97013ed0d +title: The Box Model Question F +challengeType: 15 +dashedName: the-box-model-question-f +--- +# --description-- + +The first important concept that you need to understand to be successful in CSS is the box model. It isn’t complicated, but skipping over it now will cause you much frustration down the line. + +Every single thing on a webpage is a rectangular box. These boxes can have other boxes in them and can sit alongside one another. You can get a rough idea of how this works by sticking a border on every item on the page like this: + +```css +* { + border: 1px solid red; +} +``` + + +# --question-- + +## --assignment-- + +Add a border to every element on the page and see how the boxes are laid out. + +## --text-- + +What is the fundamental concept in CSS that helps you understand the structure of elements as rectangular boxes? + +## --answers-- + +Box-sizing + +--- + +Box-shadow + +--- + +Box model + +--- + +Border-box + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-g.md b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-g.md new file mode 100644 index 00000000000..b8c981a7aa9 --- /dev/null +++ b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-g.md @@ -0,0 +1,52 @@ +--- +id: 64a6702e7a7d00f97013ed0e +title: The Box Model Question G +challengeType: 15 +dashedName: the-box-model-question-g +--- +# --description-- + +![lines](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/odin-lined.png) + +OK, so there might be some circles in the above image… but when it comes to layout, they fit together like rectangular boxes and not circles. In the end, laying out a webpage and positioning all its elements is deciding how you are going to nest and stack these boxes. + +The only real complication here is that there are many ways to manipulate the size of these boxes, and the space between them, using padding, margin, and border. But to sum it up briefly: + +- `padding` increases the space between the border of a box and the content of the box. +- `margin` increases the space between the borders of a box and the borders of adjacent boxes. +- `border` adds space (even if it’s only a pixel or two) between the margin and the padding. + +Be sure to study the diagrams carefully. + +![the box model](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/box-model.png) + +# --question-- + +## --assignment-- + +Add a border to every element on the page and see how the boxes are laid out. + +## --text-- + +From inside to outside, what is the order of box-model properties? + +## --answers-- + +Content, Margin, Padding, Border + +--- + +Margin, Padding, Content, Border + +--- + +Content, Padding, Border, Margin + +--- + +Padding, Content, Border, Margin + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-h.md b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-h.md new file mode 100644 index 00000000000..3c711550b34 --- /dev/null +++ b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-h.md @@ -0,0 +1,37 @@ +--- +id: 64a674937a7d00f97013ed0f +videoId: rIO5326FgPE +title: The Box Model Question H +challengeType: 15 +dashedName: the-box-model-question-h +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +What does the box-sizing CSS property do? + +## --answers-- + +It determines the order of the box-model properties. + +--- + +It specifies the position of an element on the webpage. + +--- + +It controls how the total width and height of an element are calculated. + +--- + +It sets the background color of an element. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-i.md b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-i.md new file mode 100644 index 00000000000..026ca2c2034 --- /dev/null +++ b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-i.md @@ -0,0 +1,36 @@ +--- +id: 64a6749a7a7d00f97013ed10 +videoId: rIO5326FgPE +title: The Box Model Question I +challengeType: 15 +dashedName: the-box-model-question-i +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +What is the difference between the standard and alternative box model? + +## --answers-- + +The standard box model calculates the width and height of an element based on the content alone, while the alternative box model calculates based on the content plus padding and border. + +--- + +The standard box model includes content, padding, and border, while the alternative box model includes only the content. + +--- + +The standard box model and the alternative box model are the same and have no differences. + +--- + +The standard box model includes only the content, while the alternative box model includes content, padding, and border. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-j.md b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-j.md new file mode 100644 index 00000000000..990fedec175 --- /dev/null +++ b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-j.md @@ -0,0 +1,37 @@ +--- +id: 64a674a47a7d00f97013ed11 +videoId: rIO5326FgPE +title: The Box Model Question J +challengeType: 15 +dashedName: the-box-model-question-j +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Would you use margin or padding to create more space between 2 elements? + +## --answers-- + +Padding + +--- + +Both margin and padding can be used interchangeably + +--- + +Neither margin nor padding can be used to create more space between elements + +--- + +Margin + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-k.md b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-k.md new file mode 100644 index 00000000000..933a01523c2 --- /dev/null +++ b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-k.md @@ -0,0 +1,36 @@ +--- +id: 64a674ac7a7d00f97013ed12 +videoId: rIO5326FgPE +title: The Box Model Question K +challengeType: 15 +dashedName: the-box-model-question-k +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Which CSS property would you use to create more space between the contents of an element and its border? + +## --answers-- + +Margin + +--- + +Padding + +--- + +Border + +--- + +Float + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-l.md b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-l.md new file mode 100644 index 00000000000..80dfdc527af --- /dev/null +++ b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-l.md @@ -0,0 +1,28 @@ +--- +id: 64a674b97a7d00f97013ed13 +videoId: rIO5326FgPE +title: The Box Model Question L +challengeType: 15 +dashedName: the-box-model-question-l +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Would you use margin or padding if you wanted two elements to overlap each other? + +## --answers-- + +Padding + +--- + +Margin + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-m.md b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-m.md new file mode 100644 index 00000000000..c55213cfd1b --- /dev/null +++ b/curriculum/challenges/chinese/16-the-odin-project/top-the-box-model/the-box-model-question-m.md @@ -0,0 +1,67 @@ +--- +id: 64a674c27a7d00f97013ed14 +videoId: rIO5326FgPE +title: The Box Model Question M +challengeType: 15 +dashedName: the-box-model-question-m +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +How do you set the alternative box model for all of your elements? + +## --answers-- + +```css +html { + box-sizing: inherit; +} +*, +*::before, +*::after { + box-sizing: border-box; +} +``` + +--- + +```css +* { + box-sizing: border-box; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +* { + box-sizing: inherit; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +*, +*::before, +*::after { + box-sizing: inherit; +} +``` + + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/chinese/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md b/curriculum/challenges/chinese/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md index 9793d760c20..93e60e4d425 100644 --- a/curriculum/challenges/chinese/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md +++ b/curriculum/challenges/chinese/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md @@ -62,5 +62,70 @@ doubleBasePalindromes(1000000); # --solutions-- ```js -// solution required +function buildPalindromesBase10(len) { + // Base cases + const palindromes = []; + if (len > 0) { + palindromes.push([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]); + } + if (len > 1) { + palindromes.push([11, 22, 33, 44, 55, 66, 77, 88, 99, 0]); + } + + for (let i = 3; i <= len; i++) { + const lengthIPalindromes = []; + + for (let j = 1; j < 10; j++) { + const firstDigit = j * (10 ** (i - 1)); + const lastDigit = j; + // Build off of palindromes 2 digits shorter + { + const shorterPalindromes = palindromes[i - 3]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 10 + lastDigit); + } + } + // Build off of palindromes 4 digits shorter + if (i > 4) { + const shorterPalindromes = palindromes[i - 5]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 100 + lastDigit); + } + } + } + palindromes.push(lengthIPalindromes); + } + return palindromes.flat(); +} + +function isPalindrome(num) { + const numAsString = num.toString(); + const numDigits = numAsString.length; + for (let i = 0; i < numDigits / 2; i++) { + if (numAsString[i] !== numAsString[numDigits - 1 - i]) { + return false; + } + } + return true; +} + +function isPalindromeBase2(num) { + return isPalindrome(num.toString(2)); +} + +function doubleBasePalindromes(n) { + let palindromeSum = 0; + const maxDigits = Math.ceil(Math.log10(n)); + const palindromesBase10 = buildPalindromesBase10(maxDigits); + + // Loop over all palindromes less than n + for (let i = 0; i < palindromesBase10.length && palindromesBase10[i] < n; i++) { + if (isPalindromeBase2(palindromesBase10[i])) { + palindromeSum += palindromesBase10[i]; + } + } + return palindromeSum; +} ``` diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md index 188c50d7a4f..f408cca2a4c 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md @@ -39,23 +39,16 @@ Tu código no debe usar el método `splice`. assert(!code.match(/\.?[\s\S]*?splice/g)); ``` -El arreglo `inputCities` no debe ser cambiado. +You should not mutate the original array passed to the function. ```js -assert( - JSON.stringify(inputCities) === - JSON.stringify(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) -); +assert.deepEqual(_inputCities, ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]); ``` `nonMutatingSplice(["Chicago", "Delhi", "Islamabad", "London", "Berlin"])` debe devolver `["Chicago", "Delhi", "Islamabad"]`. ```js -assert( - JSON.stringify( - nonMutatingSplice(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) - ) === JSON.stringify(['Chicago', 'Delhi', 'Islamabad']) -); +assert.deepEqual(nonMutatingSplice(_inputCities), ["Chicago", "Delhi", "Islamabad"]); ``` # --seed-- @@ -64,14 +57,15 @@ assert( ```js function nonMutatingSplice(cities) { - // Only change code below this line + return cities.splice(3); - - // Only change code above this line } +``` -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; -nonMutatingSplice(inputCities); +## --after-user-code-- + +```js +const _inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` # --solutions-- @@ -80,5 +74,4 @@ nonMutatingSplice(inputCities); function nonMutatingSplice(cities) { return cities.slice(0,3); } -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` diff --git a/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-a.md b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-a.md new file mode 100644 index 00000000000..81cc2d54518 --- /dev/null +++ b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-a.md @@ -0,0 +1,45 @@ +--- +id: 64a5529c02815a7d323aab88 +title: The Box Model Question A +challengeType: 15 +dashedName: the-box-model-question-a +--- + +# --description-- + +Being able to inspect and debug your HTML and CSS is critical to frontend development. This lesson will take us through the Chrome Dev Tools, which allow you to see detailed information about your elements and CSS rules, as well as assist you in finding and fixing problems in your code. + +To open up the inspector, you can right-click on any element of a webpage and click “Inspect” or press F12. Go ahead and do that right now to see the HTML and CSS used on this page. + +Don’t get overwhelmed with all the tools you’re now seeing! For this lesson, we want to focus on the Elements and Styles panes. + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +Which panes should you focus on in the Chrome Dev Tools for inspecting and debugging HTML and CSS? + +## --answers-- + +Console and Network + +--- + +Elements and Styles + +--- + +Sources and Application + +--- + +Performance and Memory + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-b.md b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-b.md new file mode 100644 index 00000000000..c830844ef5e --- /dev/null +++ b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-b.md @@ -0,0 +1,42 @@ +--- +id: 64a553ed02815a7d323aab89 +title: The Box Model Question B +challengeType: 15 +dashedName: the-box-model-question-b +--- + +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --text-- + +When inspecting an element in the Chrome Dev Tools, if a style property is shown with a strikethrough, what does it indicate? + +## --answers-- + +The style property is currently disabled and not applied to the element. + +--- + +The style property is overridden by a more specific CSS rule. + +--- + +The style property is deprecated and should not be used. + +--- + +The style property is experimental and may not be supported by all browsers + +## --video-solution-- + +2 diff --git a/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-c.md b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-c.md new file mode 100644 index 00000000000..84cee19aea0 --- /dev/null +++ b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-c.md @@ -0,0 +1,46 @@ +--- +id: 64a5551d02815a7d323aab8a +title: The Box Model Question C +challengeType: 15 +dashedName: the-box-model-question-c +--- +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +Which feature in the Elements pane allows you to select any element on a webpage by hovering over it? + +## --answers-- + +Blue-highlighted icon + +--- + +Styles tab + +--- + +Inspector tab + +--- + +HTML structure view + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-d.md b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-d.md new file mode 100644 index 00000000000..4d882631471 --- /dev/null +++ b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-d.md @@ -0,0 +1,47 @@ +--- +id: 64a55a6102815a7d323aab8b +title: The Box Model Question D +challengeType: 15 +dashedName: the-box-model-question-d +--- +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +In the Styles pane, what information can you view about an element when it is selected? + +## --answers-- + +HTML structure and CSS rules + +--- + +Styles tab + +--- + +Inspector tab + +--- + +Applied styles and overwritten styles. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-e.md b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-e.md new file mode 100644 index 00000000000..7db2559056a --- /dev/null +++ b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-e.md @@ -0,0 +1,38 @@ +--- +id: 64a669f77a7d00f97013ed0c +title: The Box Model Question E +challengeType: 15 +dashedName: the-box-model-question-e +--- +# --description-- + +Now that you understand the basic syntax of HTML and CSS, we’re going to get serious. The most important skills you need to master with CSS are positioning and layout. Changing fonts and colors is a crucial skill, but being able to put things exactly where you want them on a webpage is even more crucial. After all, how many webpages can you find where absolutely every element is just stacked one on top of another? + +Learning to position elements on a webpage is not that difficult once you understand just a few key concepts. Unfortunately, many learners race through learning HTML and CSS to get to JavaScript and end up missing these fundamental concepts. This leads to frustration, pain, (and funny gifs) because all the JavaScript skills in the world are meaningless if you can’t stick your elements on the page where you need them to be. So with that in mind, let’s get started. + +# --question-- + +## --text-- + +Why is it important to have a solid understanding of CSS in web development? + +## --answers-- + +It allows you to create complex animations and interactive effects. + +--- + +It allows you to create complex animations and interactive effects. + +--- + +It helps in optimizing database queries for improved performance. + +--- + +It enables you to style and design webpages with precision and control. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-f.md b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-f.md new file mode 100644 index 00000000000..a91d049aee3 --- /dev/null +++ b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-f.md @@ -0,0 +1,49 @@ +--- +id: 64a66c917a7d00f97013ed0d +title: The Box Model Question F +challengeType: 15 +dashedName: the-box-model-question-f +--- +# --description-- + +The first important concept that you need to understand to be successful in CSS is the box model. It isn’t complicated, but skipping over it now will cause you much frustration down the line. + +Every single thing on a webpage is a rectangular box. These boxes can have other boxes in them and can sit alongside one another. You can get a rough idea of how this works by sticking a border on every item on the page like this: + +```css +* { + border: 1px solid red; +} +``` + + +# --question-- + +## --assignment-- + +Add a border to every element on the page and see how the boxes are laid out. + +## --text-- + +What is the fundamental concept in CSS that helps you understand the structure of elements as rectangular boxes? + +## --answers-- + +Box-sizing + +--- + +Box-shadow + +--- + +Box model + +--- + +Border-box + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-g.md b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-g.md new file mode 100644 index 00000000000..b8c981a7aa9 --- /dev/null +++ b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-g.md @@ -0,0 +1,52 @@ +--- +id: 64a6702e7a7d00f97013ed0e +title: The Box Model Question G +challengeType: 15 +dashedName: the-box-model-question-g +--- +# --description-- + +![lines](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/odin-lined.png) + +OK, so there might be some circles in the above image… but when it comes to layout, they fit together like rectangular boxes and not circles. In the end, laying out a webpage and positioning all its elements is deciding how you are going to nest and stack these boxes. + +The only real complication here is that there are many ways to manipulate the size of these boxes, and the space between them, using padding, margin, and border. But to sum it up briefly: + +- `padding` increases the space between the border of a box and the content of the box. +- `margin` increases the space between the borders of a box and the borders of adjacent boxes. +- `border` adds space (even if it’s only a pixel or two) between the margin and the padding. + +Be sure to study the diagrams carefully. + +![the box model](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/box-model.png) + +# --question-- + +## --assignment-- + +Add a border to every element on the page and see how the boxes are laid out. + +## --text-- + +From inside to outside, what is the order of box-model properties? + +## --answers-- + +Content, Margin, Padding, Border + +--- + +Margin, Padding, Content, Border + +--- + +Content, Padding, Border, Margin + +--- + +Padding, Content, Border, Margin + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-h.md b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-h.md new file mode 100644 index 00000000000..3c711550b34 --- /dev/null +++ b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-h.md @@ -0,0 +1,37 @@ +--- +id: 64a674937a7d00f97013ed0f +videoId: rIO5326FgPE +title: The Box Model Question H +challengeType: 15 +dashedName: the-box-model-question-h +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +What does the box-sizing CSS property do? + +## --answers-- + +It determines the order of the box-model properties. + +--- + +It specifies the position of an element on the webpage. + +--- + +It controls how the total width and height of an element are calculated. + +--- + +It sets the background color of an element. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-i.md b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-i.md new file mode 100644 index 00000000000..026ca2c2034 --- /dev/null +++ b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-i.md @@ -0,0 +1,36 @@ +--- +id: 64a6749a7a7d00f97013ed10 +videoId: rIO5326FgPE +title: The Box Model Question I +challengeType: 15 +dashedName: the-box-model-question-i +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +What is the difference between the standard and alternative box model? + +## --answers-- + +The standard box model calculates the width and height of an element based on the content alone, while the alternative box model calculates based on the content plus padding and border. + +--- + +The standard box model includes content, padding, and border, while the alternative box model includes only the content. + +--- + +The standard box model and the alternative box model are the same and have no differences. + +--- + +The standard box model includes only the content, while the alternative box model includes content, padding, and border. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-j.md b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-j.md new file mode 100644 index 00000000000..990fedec175 --- /dev/null +++ b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-j.md @@ -0,0 +1,37 @@ +--- +id: 64a674a47a7d00f97013ed11 +videoId: rIO5326FgPE +title: The Box Model Question J +challengeType: 15 +dashedName: the-box-model-question-j +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Would you use margin or padding to create more space between 2 elements? + +## --answers-- + +Padding + +--- + +Both margin and padding can be used interchangeably + +--- + +Neither margin nor padding can be used to create more space between elements + +--- + +Margin + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-k.md b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-k.md new file mode 100644 index 00000000000..933a01523c2 --- /dev/null +++ b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-k.md @@ -0,0 +1,36 @@ +--- +id: 64a674ac7a7d00f97013ed12 +videoId: rIO5326FgPE +title: The Box Model Question K +challengeType: 15 +dashedName: the-box-model-question-k +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Which CSS property would you use to create more space between the contents of an element and its border? + +## --answers-- + +Margin + +--- + +Padding + +--- + +Border + +--- + +Float + +## --video-solution-- + +2 diff --git a/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-l.md b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-l.md new file mode 100644 index 00000000000..80dfdc527af --- /dev/null +++ b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-l.md @@ -0,0 +1,28 @@ +--- +id: 64a674b97a7d00f97013ed13 +videoId: rIO5326FgPE +title: The Box Model Question L +challengeType: 15 +dashedName: the-box-model-question-l +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Would you use margin or padding if you wanted two elements to overlap each other? + +## --answers-- + +Padding + +--- + +Margin + +## --video-solution-- + +2 diff --git a/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-m.md b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-m.md new file mode 100644 index 00000000000..c55213cfd1b --- /dev/null +++ b/curriculum/challenges/espanol/16-the-odin-project/top-the-box-model/the-box-model-question-m.md @@ -0,0 +1,67 @@ +--- +id: 64a674c27a7d00f97013ed14 +videoId: rIO5326FgPE +title: The Box Model Question M +challengeType: 15 +dashedName: the-box-model-question-m +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +How do you set the alternative box model for all of your elements? + +## --answers-- + +```css +html { + box-sizing: inherit; +} +*, +*::before, +*::after { + box-sizing: border-box; +} +``` + +--- + +```css +* { + box-sizing: border-box; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +* { + box-sizing: inherit; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +*, +*::before, +*::after { + box-sizing: inherit; +} +``` + + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/espanol/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md b/curriculum/challenges/espanol/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md index 9793d760c20..93e60e4d425 100644 --- a/curriculum/challenges/espanol/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md +++ b/curriculum/challenges/espanol/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md @@ -62,5 +62,70 @@ doubleBasePalindromes(1000000); # --solutions-- ```js -// solution required +function buildPalindromesBase10(len) { + // Base cases + const palindromes = []; + if (len > 0) { + palindromes.push([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]); + } + if (len > 1) { + palindromes.push([11, 22, 33, 44, 55, 66, 77, 88, 99, 0]); + } + + for (let i = 3; i <= len; i++) { + const lengthIPalindromes = []; + + for (let j = 1; j < 10; j++) { + const firstDigit = j * (10 ** (i - 1)); + const lastDigit = j; + // Build off of palindromes 2 digits shorter + { + const shorterPalindromes = palindromes[i - 3]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 10 + lastDigit); + } + } + // Build off of palindromes 4 digits shorter + if (i > 4) { + const shorterPalindromes = palindromes[i - 5]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 100 + lastDigit); + } + } + } + palindromes.push(lengthIPalindromes); + } + return palindromes.flat(); +} + +function isPalindrome(num) { + const numAsString = num.toString(); + const numDigits = numAsString.length; + for (let i = 0; i < numDigits / 2; i++) { + if (numAsString[i] !== numAsString[numDigits - 1 - i]) { + return false; + } + } + return true; +} + +function isPalindromeBase2(num) { + return isPalindrome(num.toString(2)); +} + +function doubleBasePalindromes(n) { + let palindromeSum = 0; + const maxDigits = Math.ceil(Math.log10(n)); + const palindromesBase10 = buildPalindromesBase10(maxDigits); + + // Loop over all palindromes less than n + for (let i = 0; i < palindromesBase10.length && palindromesBase10[i] < n; i++) { + if (isPalindromeBase2(palindromesBase10[i])) { + palindromeSum += palindromesBase10[i]; + } + } + return palindromeSum; +} ``` diff --git a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md index 8253a382a0f..5ed1904c0a4 100644 --- a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md +++ b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md @@ -39,23 +39,16 @@ Dein Code sollte nicht die Methode `splice` verwenden. assert(!code.match(/\.?[\s\S]*?splice/g)); ``` -Das Array `inputCities` sollte sich nicht ändern. +You should not mutate the original array passed to the function. ```js -assert( - JSON.stringify(inputCities) === - JSON.stringify(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) -); +assert.deepEqual(_inputCities, ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]); ``` `nonMutatingSplice(["Chicago", "Delhi", "Islamabad", "London", "Berlin"])` sollte `["Chicago", "Delhi", "Islamabad"]` zurückgeben. ```js -assert( - JSON.stringify( - nonMutatingSplice(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) - ) === JSON.stringify(['Chicago', 'Delhi', 'Islamabad']) -); +assert.deepEqual(nonMutatingSplice(_inputCities), ["Chicago", "Delhi", "Islamabad"]); ``` # --seed-- @@ -64,14 +57,15 @@ assert( ```js function nonMutatingSplice(cities) { - // Only change code below this line + return cities.splice(3); - - // Only change code above this line } +``` -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; -nonMutatingSplice(inputCities); +## --after-user-code-- + +```js +const _inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` # --solutions-- @@ -80,5 +74,4 @@ nonMutatingSplice(inputCities); function nonMutatingSplice(cities) { return cities.slice(0,3); } -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d129a417d0716a94de913.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d129a417d0716a94de913.md index 3f0c87ad9be..fd54688f300 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d129a417d0716a94de913.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d129a417d0716a94de913.md @@ -7,7 +7,7 @@ dashedName: step-70 # --description-- -Target the `.beak` element with a `class` of `bottom`, and give it a `width` `4%` smaller than `.beak.top`, `5%` further from the top, and `2%` further from the left of its parent than `.beak.top`. +Wähle das `.beak`-Element mit einer `class` von `bottom` aus und weise ihm eine `width` zu, die `4%` kleiner ist als `.beak.top`, `5%` weiter weg vom oberen Rand und `2%` weiter links vom Elternelement als `.beak.top`. # --hints-- @@ -17,13 +17,13 @@ Du solltest den `.beak.bottom`-Selektor verwenden. assert.match(code, /\.beak\.bottom\s*\{/); ``` -You should give `.beak.bottom` a `width` of `--fcc-expected--`, but found `--fcc-actual--`. +Du solltest `.beak.bottom` eine `width` von `--fcc-expected--` zuweisen, aber es wurde `--fcc-actual--` gefunden. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.beak.bottom')?.width, '16%'); ``` -You should give `.beak.bottom` a `top` of `--fcc-expected--`, but found `--fcc-actual--`. +Du solltest `.beak.bottom` ein `top` von `--fcc-expected--` zuweisen, aber es wurde `--fcc-actual--` gefunden. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.beak.bottom')?.top, '65%'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d36103839c82efa95dd34.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d36103839c82efa95dd34.md index 5312b8a721a..ff5b56b47f2 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d36103839c82efa95dd34.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d36103839c82efa95dd34.md @@ -11,19 +11,19 @@ dashedName: step-103 # --hints-- -You should give `.penguin` a `transition-duration` of `--fcc-expected--`, but found `--fcc-actual--`. +Du solltest `.penguin` eine `transition-duration` von `--fcc-expected--` zuweisen, aber es wurde `--fcc-actual--` gefunden. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.penguin')?.transitionDuration, '1s'); ``` -You should give `.penguin` a `transition-timing-function` of `--fcc-expected--`, but found `--fcc-actual--`. +Du solltest `.penguin` eine `transition-timing-function` von `--fcc-expected--` zuweisen, aber es wurde `--fcc-actual--` gefunden. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.penguin')?.transitionTimingFunction, 'ease-in-out'); ``` -You should give `.penguin` a `transition-delay` of `--fcc-expected--`, but found `--fcc-actual--`. +Du solltest `.penguin` ein `transition-delay` von `--fcc-expected--` zuweisen, aber es wurde `--fcc-actual--` gefunden. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.penguin')?.transitionDelay, '0ms'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98fe.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98fe.md index eadd4003782..2ee3d566e97 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98fe.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98fe.md @@ -7,7 +7,7 @@ dashedName: step-54 # --description-- -Create and add the following properties to `.bb2a`: +Erstelle und füge die folgenden Eigenschaften zu `.bb2a` hinzu: ```css margin: auto; diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fac4095512d3066053d73c.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fac4095512d3066053d73c.md index c258e200758..36554b4a94a 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fac4095512d3066053d73c.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fac4095512d3066053d73c.md @@ -9,7 +9,7 @@ dashedName: step-33 Mit dem `select`-Element kann man dem Formular leicht einen Dropdown hinzufügen. Das `select`-Element ist ein Container für eine Gruppe von `option`-Elementen und das `option`-Element fungiert als Label für jede Dropdown-Option. Both elements require closing tags. -Start by adding a `select` element below the two `label` elements. Then nest 5 `option` elements within the `select` element. +Start by adding a `select` element below the two `label` elements. Bette dann innerhalb des `select`-Elements 5 `option`-Elemente ein. # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5157b.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5157b.md index bb80fb3b34d..46fc8d8ac62 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5157b.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5157b.md @@ -11,7 +11,7 @@ To get your painting started, give your `body` element a `background-color` of ` # --hints-- -You should use the `body` selector. +Du solltest den `body`-Selektor verwenden. ```js assert(new __helpers.CSSHelp(document).getStyle('body')); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5157c.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5157c.md index 57df48ddb55..ff287672801 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5157c.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5157c.md @@ -7,11 +7,11 @@ dashedName: step-6 # --description-- -Within your body tag, add a `div` element. Give it an `id` of `back-wall`. +Füge innerhalb deines Body-Tags ein `div`-Element hinzu. Give it an `id` of `back-wall`. # --hints-- -You should add exactly 1 `div` element. +Du solltest genau 1 `div`-Element hinzufügen. ```js assert(document.querySelectorAll('div').length === 1); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51583.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51583.md index 165f13209ad..62ecd85209c 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51583.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51583.md @@ -23,19 +23,19 @@ Your first new `div` element should have the `id` of `white-hat`. assert(document.querySelectorAll('#offwhite-character div')[0]?.getAttribute('id') === 'white-hat'); ``` -Your second new `div` element should have the `id` of `black-mask`. +Dein zweites neues `div`-Element sollte die `id` `black-mask` enthalten. ```js assert(document.querySelectorAll('#offwhite-character div')[1]?.getAttribute('id') === 'black-mask'); ``` -Your third new `div` element should have the `id` of `gray-instrument`. +Dein drittes neues `div`-Element sollte die `id` `gray-instrument` enthalten. ```js assert(document.querySelectorAll('#offwhite-character div')[2]?.getAttribute('id') === 'gray-instrument'); ``` -Your fourth new `div` element should have the `id` of `tan-table`. +Dein viertes neues `div`-Element sollte die `id` `tan-table` enthalten. ```js assert(document.querySelectorAll('#offwhite-character div')[3]?.getAttribute('id') === 'tan-table'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51584.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51584.md index 0f912e2afe6..152aa3dbbf9 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51584.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51584.md @@ -11,7 +11,7 @@ This character needs eyes. Erstelle zwei `div`-Elemente im `#black-mask`-Element # --hints-- -You should create 2 `div` elements within your `#black-mask` element. +Du solltest innerhalb deines `#black-mask`-Elements 2 `div`-Elemente erstellen. ```js assert(document.querySelectorAll('#black-mask div').length === 2); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51586.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51586.md index e7923569a01..e3105e697ee 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51586.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51586.md @@ -11,25 +11,25 @@ Erstelle mit einem ID-Selektor eine Regel für das Element mit der ID `offwhite- # --hints-- -You should use the `#offwhite-character` selector. +Du solltest den `#offwhite-character`-Selektor verwenden. ```js assert(new __helpers.CSSHelp(document).getStyle('#offwhite-character')); ``` -Your `#offwhite-character` should have a `width` property set to `300px`. +Dein `#offwhite-character` sollte eine `width`-Eigenschaft von `300px` enthalten. ```js assert(new __helpers.CSSHelp(document).getStyle('#offwhite-character')?.width === '300px'); ``` -Your `#offwhite-character` should have a `height` property set to `550px`. +Dein `#offwhite-character` sollte eine `height`-Eigenschaft von `550px` enthalten. ```js assert(new __helpers.CSSHelp(document).getStyle('#offwhite-character')?.height === '550px'); ``` -Your `#offwhite-character` should have a `background-color` property set to `GhostWhite`. +Dein `#offwhite-character` sollte eine `background-color`-Eigenschaft von `GhostWhite` enthalten. ```js assert(new __helpers.CSSHelp(document).getStyle('#offwhite-character')?.backgroundColor === 'ghostwhite'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51588.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51588.md index 2c21f679c47..4b24d0212ff 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51588.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51588.md @@ -11,25 +11,25 @@ Gestalte das Element mit der ID `white-hat` unter Verwendung eines ID-Selektors. # --hints-- -You should use a `#white-hat` selector. +Du solltest einen `#white-hat`-Selektor verwenden. ```js assert(new __helpers.CSSHelp(document).getStyle('#white-hat')); ``` -Your `#white-hat` selector should have a `width` property set to `0`. +Dein `#white-hat`-Selektor sollte eine `width`-Eigenschaft von `0` enthalten. ```js assert(new __helpers.CSSHelp(document).getStyle('#white-hat')?.width === '0px'); ``` -Your `#white-hat` selector should have a `height` property set to `0`. +Dein `#white-hat`-Selektor sollte eine `height`-Eigenschaft von `0` haben. ```js assert(new __helpers.CSSHelp(document).getStyle('#white-hat')?.height === '0px'); ``` -Your `#white-hat` selector should have a `border-style` property set to `solid`. +Dein `#white-hat`-Selektor sollte eine `border-style`-Eigenschaft von `solid` enthalten. ```js assert(new __helpers.CSSHelp(document).getStyle('#white-hat')?.borderStyle === 'solid'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5158b.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5158b.md index 465869d8c0f..e88ee142963 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5158b.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5158b.md @@ -17,7 +17,7 @@ Your `#white-hat` selector should have a `position` property set to `absolute`. assert(new __helpers.CSSHelp(document).getStyle('#white-hat')?.position === 'absolute'); ``` -Your `#white-hat` selector should have a `top` property set to `-140px`. +Dein `#white-hat`-Selektor sollte eine `top`-Eigenschaft von `-140px` enthalten. ```js assert(new __helpers.CSSHelp(document).getStyle('#white-hat')?.top === '-140px'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5158d.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5158d.md index 1c584a3ffde..2f5294d543d 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5158d.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5158d.md @@ -11,19 +11,19 @@ Give the mask a `position` of `absolute`, and a `top` and `left` value of `0`. # --hints-- -Your `#black-mask` selector should have a `position` property set to `absolute`. +Dein `#black-mask`-Selektor sollte eine `position`-Eigenschaft von `absolute` haben. ```js assert(new __helpers.CSSHelp(document).getStyle('#black-mask')?.position === 'absolute'); ``` -Your `#black-mask` selector should have a `top` property set to `0`. +Dein `#black-mask`-Selektor sollte eine `top`-Eigenschaft von `0` enthalten. ```js assert(new __helpers.CSSHelp(document).getStyle('#black-mask')?.top === '0px'); ``` -Your `#black-mask` selector should have a `left` property set to `0`. +Dein `#black-mask`-Selektor sollte eine `left`-Eigenschaft von `0` haben. ```js assert(new __helpers.CSSHelp(document).getStyle('#black-mask')?.left === '0px'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51590.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51590.md index a89ccd7f63f..e251c368ef0 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51590.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51590.md @@ -11,19 +11,19 @@ Now move it into place with a `position` of `absolute`, a `top` value of `50px`, # --hints-- -Your `#gray-instrument` selector should have a `position` property set to `absolute`. +Dein `#gray-instrument`-Selektor sollte eine `position` von `absolute` enthalten. ```js assert(new __helpers.CSSHelp(document).getStyle('#gray-instrument')?.position === 'absolute'); ``` -Your `#gray-instrument` selector should have a `top` value set to `50px`. +Dein `#gray-instrument`-Selektor sollte einen `top`-Wert von `50px` enthalten. ```js assert(new __helpers.CSSHelp(document).getStyle('#gray-instrument')?.top === '50px'); ``` -Your `#gray-instrument` selector should have a `left` value set to `125px`. +Dein `#gray-instrument`-Selektor sollte einen `left`-Wert von `125px` enthalten. ```js assert(new __helpers.CSSHelp(document).getStyle('#gray-instrument')?.left === '125px'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51598.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51598.md index 2081e806676..95ac2977d2b 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51598.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c51598.md @@ -7,17 +7,17 @@ dashedName: step-34 # --description-- -After your `div#offwhite-character` element, add a `div` with the `id` of `black-character`. +Füge nach deinem `div#offwhite-character`-Element ein `div` mit der `id` `black-character` hinzu. # --hints-- -You should add a new `div` element within the `.characters` element. +Du solltest innerhalb des `.characters`-Elements ein neues `div`-Element hinzufügen. ```js assert(document.querySelectorAll('.characters > div')?.length === 2); ``` -Your new `div` element should have the `id` set to `black-character`. +Dein neues `div`-Element sollte die `id` auf `black-character` gesetzt haben. ```js assert(document.querySelectorAll('.characters > div')?.[1]?.getAttribute('id') === 'black-character'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5159a.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5159a.md index bd5c069990b..388afb777e3 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5159a.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5159a.md @@ -11,7 +11,7 @@ The mask needs eyes. Füge innerhalb deines `#gray-mask`-Elements zwei `div`-Ele # --hints-- -You should have two `div` elements within your `#gray-mask` element. +Du solltest innerhalb deines `#gray-mask`-Elements zwei `div`-Elemente haben. ```js assert(document.querySelectorAll('#gray-mask > div')?.length === 2); @@ -25,7 +25,7 @@ assert(first?.classList?.contains('eyes')); assert(first?.classList?.contains('left')); ``` -Your second new `div` element should have the `class` set to `eyes right`. +Dein zweites neues `div`-Element sollte die `class` auf `eyes right` gesetzt haben. ```js const second = document.querySelectorAll('#gray-mask > div')?.[1]; diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5159d.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5159d.md index 4b1e41da180..2399cf7dff7 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5159d.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5159d.md @@ -11,7 +11,7 @@ Verschiebe das `#black-character`-Element auf seinen Platz, indem du die `positi # --hints-- -Your `#black-character` selector should have a `position` property set to `absolute`. +Dein `#black-character`-Selektor sollte eine `position`-Eigenschaft von `absolute` haben. ```js assert(new __helpers.CSSHelp(document).getStyle('#black-character')?.position === 'absolute'); @@ -23,7 +23,7 @@ Your `#black-character` selector should have a `top` property set to `30%`. assert(new __helpers.CSSHelp(document).getStyle('#black-character')?.top === '30%'); ``` -Your `#black-character` selector should have a `left` property set to `59%`. +Dein `#black-character`-Selektor sollte eine `left`-Eigenschaft von `59%` haben. ```js assert(new __helpers.CSSHelp(document).getStyle('#black-character')?.left === '59%'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5159f.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5159f.md index 048742d844d..ea78f777b47 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5159f.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c5159f.md @@ -11,25 +11,25 @@ Genau wie bei deinem `#white-hat` solltest du den Rahmen für das `#black-hat`-E # --hints-- -Your `#black-hat` selector should have a `border-top-color` property set to `transparent`. +Dein `#black-hat`-Selektor sollte eine `border-top-color`-Eigenschaft von `transparent` enthalten. ```js assert(new __helpers.CSSHelp(document).getStyle('#black-hat')?.borderTopColor === 'transparent'); ``` -Your `#black-hat` selector should have a `border-right-color` property set to `transparent`. +Dein `#black-hat`-Selektor sollte eine `border-right-color`-Eigenschaft von `transparent` haben. ```js assert(new __helpers.CSSHelp(document).getStyle('#black-hat')?.borderRightColor === 'transparent'); ``` -Your `#black-hat` selector should have a `border-bottom-color` property set to `transparent`. +Dein `#black-hat`-Selektor sollte eine `border-bottom-color`-Eigenschaft von `transparent` enthalten. ```js assert(new __helpers.CSSHelp(document).getStyle('#black-hat')?.borderBottomColor === 'transparent'); ``` -Your `#black-hat` selector should have a `border-left-color` property set to `rgb(45, 31, 19)`. +Dein `#black-hat`-Selektor sollte eine `border-left-color`-Eigenschaft von `rgb(45, 31, 19)` haben. ```js assert(new __helpers.CSSHelp(document).getStyle('#black-hat')?.borderLeftColor === 'rgb(45, 31, 19)'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c515b7.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c515b7.md index 1791dce7df8..88b067b8123 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c515b7.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c515b7.md @@ -17,13 +17,13 @@ Your `#black-round-hat` selector should have a `position` property set to `absol assert(new __helpers.CSSHelp(document).getStyle('#black-round-hat')?.position === 'absolute'); ``` -Your `#black-round-hat` selector should have a `top` property set to `-100px`. +Dein `#black-round-hat`-Selektor sollte eine `top`-Eigenschaft von `-100px` enthalten. ```js assert(new __helpers.CSSHelp(document).getStyle('#black-round-hat')?.top === '-100px'); ``` -Your `#black-round-hat` selector should have a `left` property set to `5px`. +Dein `#black-round-hat`-Selektor sollte eine `left`-Eigenschaft von `5px` haben. ```js assert(new __helpers.CSSHelp(document).getStyle('#black-round-hat')?.left === '5px'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c515b9.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c515b9.md index 89a51bf4c7a..9fc68579307 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c515b9.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c515b9.md @@ -11,7 +11,7 @@ Verwende einen ID-Selektor, um eine Regel für das Element mit der ID `eyes-div` # --hints-- -You should create an `#eyes-div` selector. +Du solltest einen `#eyes-div`-Selektor erstellen. ```js assert(new __helpers.CSSHelp(document).getStyle('#eyes-div')); @@ -23,7 +23,7 @@ Your `#eyes-div` selector should have a `width` property set to `180px`. assert(new __helpers.CSSHelp(document).getStyle('#eyes-div')?.width === '180px'); ``` -Your `#eyes-div` selector should have a `height` property set to `50px`. +Dein `#eyes-div`-Selektor sollte eine `height`-Eigenschaft von `50px` haben. ```js assert(new __helpers.CSSHelp(document).getStyle('#eyes-div')?.height === '50px'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c515be.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c515be.md index aac1dd6853e..ab619a28247 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c515be.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c515be.md @@ -11,7 +11,7 @@ Select the `id` with value `guitar-left`, and set the `position` to `absolute` a # --hints-- -You should create a new `#guitar-left` selector. +Du solltest einen neuen `#guitar-left`-Selektor erstellen. ```js assert(new __helpers.CSSHelp(document).getStyle('#guitar-left')); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c515c0.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c515c0.md index 40750a2573f..617ceb1c888 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c515c0.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-intermediate-css-by-building-a-picasso-painting/60b69a66b6ddb80858c515c0.md @@ -11,13 +11,13 @@ Now you need to move the bar icons into place. Erstelle einen Klassenselektor f # --hints-- -You should create a `.fa-bars` selector. +Du solltest einen `.fa-bars`-Selektor erstellen. ```js assert(new __helpers.CSSHelp(document).getStyle('.fa-bars')); ``` -Your `.fa-bars` selector should have a `display` property set to `block`. +Dein `.fa-bars`-Selektor sollte eine `display`-Eigenschaft von `block` haben. ```js assert(new __helpers.CSSHelp(document).getStyle('.fa-bars')?.display === 'block'); @@ -29,7 +29,7 @@ Your `.fa-bars` selector should have a `margin-top` property set to `30%`. assert(new __helpers.CSSHelp(document).getStyle('.fa-bars')?.marginTop === '30%'); ``` -Your `.fa-bars` selector should have a `margin-left` property set to `40%`. +Dein `.fa-bars`-Selektor sollte eine `margin-left`-Eigenschaft von `40%` enthalten. ```js assert(new __helpers.CSSHelp(document).getStyle('.fa-bars')?.marginLeft === '40%'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-the-css-box-model-by-building-a-rothko-painting/60a3e3396c7b40068ad69971.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-the-css-box-model-by-building-a-rothko-painting/60a3e3396c7b40068ad69971.md index a574bf2586b..4abb75d9a1d 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-the-css-box-model-by-building-a-rothko-painting/60a3e3396c7b40068ad69971.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-the-css-box-model-by-building-a-rothko-painting/60a3e3396c7b40068ad69971.md @@ -7,9 +7,9 @@ dashedName: step-8 # --description-- -Time for CSS. +Es ist Zeit für CSS. -Even though your `
` has no text, it's still treated as a box with content. Write a CSS rule that uses the `.canvas` class selector and set its `width` to 500 pixels. Here's a CSS rule that sets the width of the class `card` to 300 pixels: +Obwohl dein `
` keinen Text enthält, wird es dennoch als eine Box mit Inhalt behandelt. Schreibe eine CSS-Regel, die den `.canvas`-Klassen-Selektor verwendet und setze ihre `width` auf 500 Pixel. Hier ist eine CSS-Regel, die die Breite der Klasse `card` auf 300 Pixel setzt: ```css .card { diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md index 90b46211b07..cefe068b23b 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md @@ -11,13 +11,13 @@ Create a new `div` below your `.large` element and give it a `class` attribute s # --hints-- -You should create another `div` element. +Du solltest ein weiteres `div`-Element erstellen. ```js assert(document.querySelectorAll('div')?.length === 4); ``` -Your new `div` should have a `class` attribute set to `calories-info`. +Dein neues `div` sollte ein `class`-Attribut auf `calories-info` gesetzt haben. ```js assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('calories-info')); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md index bdf7babaa08..7a69c82b9b2 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md @@ -54,7 +54,7 @@ const zeroPercentSpan = spans.filter(span => span?.innerHTML?.match(/^[\s\n]*0%[ assert(zeroPercentSpan.length === 1); ``` -Your `0%` `span` should have the `class` attribute set to `bold`. +Bei deinem `span`-Element mit `0%` sollte das `class`-Attribut auf `bold` eingestellt sein. ```js const spans = [...document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')]; diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/build-a-caesars-cipher-project/caesars-cipher.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/build-a-caesars-cipher-project/caesars-cipher.md index 46c493ad260..b6194699dfe 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/build-a-caesars-cipher-project/caesars-cipher.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/build-a-caesars-cipher-project/caesars-cipher.md @@ -14,7 +14,7 @@ A common modern use is the ROT13 encoded string as input and returns a decoded string. -All letters will be uppercase. Do not transform any non-alphabetic character (i.e. spaces, punctuation), but do pass them on. +Alle Buchstaben werden großgeschrieben. Do not transform any non-alphabetic character (i.e. spaces, punctuation), but do pass them on. # --hints-- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642db8c409d9991d0b3b2f0d.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642db8c409d9991d0b3b2f0d.md index 3ca57fbf522..0c9e971a908 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642db8c409d9991d0b3b2f0d.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642db8c409d9991d0b3b2f0d.md @@ -1,6 +1,6 @@ --- id: 642db8c409d9991d0b3b2f0d -title: Step 1 +title: Schritt 1 challengeType: 0 dashedName: step-1 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642dccb78549c9285835ebc2.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642dccb78549c9285835ebc2.md index d7095d5ca8a..f4a770dc07b 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642dccb78549c9285835ebc2.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642dccb78549c9285835ebc2.md @@ -1,6 +1,6 @@ --- id: 642dccb78549c9285835ebc2 -title: Step 2 +title: Schritt 2 challengeType: 0 dashedName: step-2 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642def66e6a60432c9a0371e.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642def66e6a60432c9a0371e.md index 6aab064ecef..da0fa7d3770 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642def66e6a60432c9a0371e.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642def66e6a60432c9a0371e.md @@ -1,6 +1,6 @@ --- id: 642def66e6a60432c9a0371e -title: Step 4 +title: Schritt 4 challengeType: 0 dashedName: step-4 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e0011c45c893845842058.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e0011c45c893845842058.md index 2698f6ad2b8..50f787a29c7 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e0011c45c893845842058.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e0011c45c893845842058.md @@ -1,6 +1,6 @@ --- id: 642e0011c45c893845842058 -title: Step 8 +title: Schritt 8 challengeType: 0 dashedName: step-8 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e004130958c3975aa3a4a.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e004130958c3975aa3a4a.md index aa9a9db2ec4..935622d0d74 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e004130958c3975aa3a4a.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e004130958c3975aa3a4a.md @@ -1,6 +1,6 @@ --- id: 642e004130958c3975aa3a4a -title: Step 9 +title: Schritt 9 challengeType: 0 dashedName: step-9 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e02be7845f13b014cd2b0.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e02be7845f13b014cd2b0.md index c280f9d99ad..1f189b90658 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e02be7845f13b014cd2b0.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e02be7845f13b014cd2b0.md @@ -1,6 +1,6 @@ --- id: 642e02be7845f13b014cd2b0 -title: Step 10 +title: Schritt 10 challengeType: 0 dashedName: step-10 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434552bcc0a951a0a99df3b.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434552bcc0a951a0a99df3b.md index e72b47c2c9d..4c125bcae22 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434552bcc0a951a0a99df3b.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434552bcc0a951a0a99df3b.md @@ -1,6 +1,6 @@ --- id: 6434552bcc0a951a0a99df3b -title: Step 11 +title: Schritt 11 challengeType: 0 dashedName: step-11 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345c560591891f64976f7a.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345c560591891f64976f7a.md index 51d5bc5f178..8cf4b4b6f0a 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345c560591891f64976f7a.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345c560591891f64976f7a.md @@ -1,6 +1,6 @@ --- id: 64345c560591891f64976f7a -title: Step 13 +title: Schritt 13 challengeType: 0 dashedName: step-13 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64347464f78cd9209545f35c.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64347464f78cd9209545f35c.md index 93f8895d535..059eb27bbf6 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64347464f78cd9209545f35c.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64347464f78cd9209545f35c.md @@ -1,6 +1,6 @@ --- id: 64347464f78cd9209545f35c -title: Step 14 +title: Schritt 14 challengeType: 0 dashedName: step-14 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434759f78ec812264ff8f34.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434759f78ec812264ff8f34.md index 68ac4adb75e..2140fffa2e6 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434759f78ec812264ff8f34.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434759f78ec812264ff8f34.md @@ -1,6 +1,6 @@ --- id: 6434759f78ec812264ff8f34 -title: Step 16 +title: Schritt 16 challengeType: 0 dashedName: step-16 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643475e13dc727231acd0f72.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643475e13dc727231acd0f72.md index f6179caf013..9035c2d837e 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643475e13dc727231acd0f72.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643475e13dc727231acd0f72.md @@ -1,6 +1,6 @@ --- id: 643475e13dc727231acd0f72 -title: Step 17 +title: Schritt 17 challengeType: 0 dashedName: step-17 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6437133052eaf04d7300e622.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6437133052eaf04d7300e622.md index 1faf5d65bcf..94e6932b57a 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6437133052eaf04d7300e622.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6437133052eaf04d7300e622.md @@ -1,6 +1,6 @@ --- id: 6437133052eaf04d7300e622 -title: Step 21 +title: Schritt 21 challengeType: 0 dashedName: step-21 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64496d1e5af8c0148fbef96d.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64496d1e5af8c0148fbef96d.md index d9107f59a66..439e8dd8d74 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64496d1e5af8c0148fbef96d.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64496d1e5af8c0148fbef96d.md @@ -1,6 +1,6 @@ --- id: 64496d1e5af8c0148fbef96d -title: Step 23 +title: Schritt 23 challengeType: 0 dashedName: step-23 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64496e9c6d7a2e189948e441.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64496e9c6d7a2e189948e441.md index 45011711b45..d7b16ed06d6 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64496e9c6d7a2e189948e441.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64496e9c6d7a2e189948e441.md @@ -1,6 +1,6 @@ --- id: 64496e9c6d7a2e189948e441 -title: Step 26 +title: Schritt 26 challengeType: 0 dashedName: step-26 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449755666005520330cec5b.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449755666005520330cec5b.md index 179b4592f0a..0e4082155dd 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449755666005520330cec5b.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449755666005520330cec5b.md @@ -1,6 +1,6 @@ --- id: 6449755666005520330cec5b -title: Step 28 +title: Schritt 28 challengeType: 0 dashedName: step-28 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64497de936a2f322327e5c58.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64497de936a2f322327e5c58.md index d8123352375..4ffd91bb8d1 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64497de936a2f322327e5c58.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64497de936a2f322327e5c58.md @@ -1,6 +1,6 @@ --- id: 64497de936a2f322327e5c58 -title: Step 30 +title: Schritt 30 challengeType: 0 dashedName: step-30 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64497e0e5e5a2c2329785af4.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64497e0e5e5a2c2329785af4.md index 94274ab2be7..591697bcc29 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64497e0e5e5a2c2329785af4.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64497e0e5e5a2c2329785af4.md @@ -1,6 +1,6 @@ --- id: 64497e0e5e5a2c2329785af4 -title: Step 31 +title: Schritt 31 challengeType: 0 dashedName: step-31 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64497e764135bd24b7960dd3.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64497e764135bd24b7960dd3.md index 010d9566ada..f19e350f323 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64497e764135bd24b7960dd3.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64497e764135bd24b7960dd3.md @@ -1,6 +1,6 @@ --- id: 64497e764135bd24b7960dd3 -title: Step 32 +title: Schritt 32 challengeType: 0 dashedName: step-32 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449842c6f6c84261075e4c9.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449842c6f6c84261075e4c9.md index 935aa053795..c96389ef512 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449842c6f6c84261075e4c9.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449842c6f6c84261075e4c9.md @@ -1,6 +1,6 @@ --- id: 6449842c6f6c84261075e4c9 -title: Step 33 +title: Schritt 33 challengeType: 0 dashedName: step-33 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64498473a17adc26ef0ecc2d.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64498473a17adc26ef0ecc2d.md index dd56044e660..af51a30d1d8 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64498473a17adc26ef0ecc2d.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64498473a17adc26ef0ecc2d.md @@ -1,6 +1,6 @@ --- id: 64498473a17adc26ef0ecc2d -title: Step 34 +title: Schritt 34 challengeType: 0 dashedName: step-34 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449849b78f43527be1e8a98.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449849b78f43527be1e8a98.md index e27060dab09..a767bb9b6f3 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449849b78f43527be1e8a98.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449849b78f43527be1e8a98.md @@ -1,6 +1,6 @@ --- id: 6449849b78f43527be1e8a98 -title: Step 35 +title: Schritt 35 challengeType: 0 dashedName: step-35 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64498542cab69128ab24e4de.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64498542cab69128ab24e4de.md index 399ef9c1f26..4e4037b76ad 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64498542cab69128ab24e4de.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64498542cab69128ab24e4de.md @@ -1,6 +1,6 @@ --- id: 64498542cab69128ab24e4de -title: Step 36 +title: Schritt 36 challengeType: 0 dashedName: step-36 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449876e7aae0d2f8257a497.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449876e7aae0d2f8257a497.md index 7f3a18fcb33..6596ed7bb71 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449876e7aae0d2f8257a497.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449876e7aae0d2f8257a497.md @@ -1,6 +1,6 @@ --- id: 6449876e7aae0d2f8257a497 -title: Step 40 +title: Schritt 40 challengeType: 0 dashedName: step-40 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64498b085028fc30a58bb6a7.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64498b085028fc30a58bb6a7.md index d58c3fa4ce9..5934e29e8e3 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64498b085028fc30a58bb6a7.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64498b085028fc30a58bb6a7.md @@ -1,6 +1,6 @@ --- id: 64498b085028fc30a58bb6a7 -title: Step 41 +title: Schritt 41 challengeType: 0 dashedName: step-41 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d0d20108440acc95a6b32.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d0d20108440acc95a6b32.md index cd6f530d636..f882a783a52 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d0d20108440acc95a6b32.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d0d20108440acc95a6b32.md @@ -1,6 +1,6 @@ --- id: 646d0d20108440acc95a6b32 -title: Step 45 +title: Schritt 45 challengeType: 0 dashedName: step-45 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d0db5175974ad8633b71c.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d0db5175974ad8633b71c.md index 31875191914..ad42a357071 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d0db5175974ad8633b71c.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d0db5175974ad8633b71c.md @@ -1,6 +1,6 @@ --- id: 646d0db5175974ad8633b71c -title: Step 46 +title: Schritt 46 challengeType: 0 dashedName: step-46 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d0e4636e14eae2bb3b992.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d0e4636e14eae2bb3b992.md index 1d41054a373..c80e09e7a50 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d0e4636e14eae2bb3b992.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d0e4636e14eae2bb3b992.md @@ -1,6 +1,6 @@ --- id: 646d0e4636e14eae2bb3b992 -title: Step 47 +title: Schritt 47 challengeType: 0 dashedName: step-47 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1980018efaaec2b1c28b.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1980018efaaec2b1c28b.md index b5f8c3a18a7..5fe0dbd4ce9 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1980018efaaec2b1c28b.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1980018efaaec2b1c28b.md @@ -1,6 +1,6 @@ --- id: 646d1980018efaaec2b1c28b -title: Step 48 +title: Schritt 48 challengeType: 0 dashedName: step-48 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1b96dd7ea4b0061458bc.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1b96dd7ea4b0061458bc.md index 0be2bf866f9..61fbcdc9f19 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1b96dd7ea4b0061458bc.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1b96dd7ea4b0061458bc.md @@ -1,6 +1,6 @@ --- id: 646d1b96dd7ea4b0061458bc -title: Step 50 +title: Schritt 50 challengeType: 0 dashedName: step-50 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1cadf0d96ab0b7e12da4.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1cadf0d96ab0b7e12da4.md index b051ce72f9d..a79bad70e2d 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1cadf0d96ab0b7e12da4.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1cadf0d96ab0b7e12da4.md @@ -1,6 +1,6 @@ --- id: 646d1cadf0d96ab0b7e12da4 -title: Step 51 +title: Schritt 51 challengeType: 0 dashedName: step-51 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1e531042dfb24da1f032.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1e531042dfb24da1f032.md index 7eaca45c1ad..a7574fa9279 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1e531042dfb24da1f032.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1e531042dfb24da1f032.md @@ -1,6 +1,6 @@ --- id: 646d1e531042dfb24da1f032 -title: Step 53 +title: Schritt 53 challengeType: 0 dashedName: step-53 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d382c4d70ceb3dba1e830.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d382c4d70ceb3dba1e830.md index 76c1950e846..27da21aa3dc 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d382c4d70ceb3dba1e830.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d382c4d70ceb3dba1e830.md @@ -1,6 +1,6 @@ --- id: 646d382c4d70ceb3dba1e830 -title: Step 55 +title: Schritt 55 challengeType: 0 dashedName: step-55 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d38c326f3c8b54023de38.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d38c326f3c8b54023de38.md index 993479b22a3..8e5f1dc6bb2 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d38c326f3c8b54023de38.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d38c326f3c8b54023de38.md @@ -1,6 +1,6 @@ --- id: 646d38c326f3c8b54023de38 -title: Step 57 +title: Schritt 57 challengeType: 0 dashedName: step-57 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3b27cd3c56b875256301.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3b27cd3c56b875256301.md index b2e33396e30..f7809d4fdf4 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3b27cd3c56b875256301.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3b27cd3c56b875256301.md @@ -1,6 +1,6 @@ --- id: 646d3b27cd3c56b875256301 -title: Step 61 +title: Schritt 61 challengeType: 0 dashedName: step-61 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3d65be79c8bb9c7df9ff.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3d65be79c8bb9c7df9ff.md index a525cab6136..6fe3a85c7df 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3d65be79c8bb9c7df9ff.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3d65be79c8bb9c7df9ff.md @@ -1,6 +1,6 @@ --- id: 646d3d65be79c8bb9c7df9ff -title: Step 65 +title: Schritt 65 challengeType: 0 dashedName: step-65 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3d80c3b4aebc4103618e.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3d80c3b4aebc4103618e.md index 16e5f6e6860..b3a2ceac108 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3d80c3b4aebc4103618e.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3d80c3b4aebc4103618e.md @@ -1,6 +1,6 @@ --- id: 646d3d80c3b4aebc4103618e -title: Step 66 +title: Schritt 66 challengeType: 0 dashedName: step-66 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3e135ab3abbdbfe5c899.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3e135ab3abbdbfe5c899.md index a96beee9c4f..6f6c019af5a 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3e135ab3abbdbfe5c899.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3e135ab3abbdbfe5c899.md @@ -1,6 +1,6 @@ --- id: 646d3e135ab3abbdbfe5c899 -title: Step 68 +title: Schritt 68 challengeType: 0 dashedName: step-68 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3e64b15f92be6e61704e.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3e64b15f92be6e61704e.md index 935e885b98a..86c0c474150 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3e64b15f92be6e61704e.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3e64b15f92be6e61704e.md @@ -1,6 +1,6 @@ --- id: 646d3e64b15f92be6e61704e -title: Step 69 +title: Schritt 69 challengeType: 0 dashedName: step-69 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3f1fd12f76c02c823bb8.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3f1fd12f76c02c823bb8.md index 27f21057126..6ebef8a40a1 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3f1fd12f76c02c823bb8.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3f1fd12f76c02c823bb8.md @@ -1,6 +1,6 @@ --- id: 646d3f1fd12f76c02c823bb8 -title: Step 71 +title: Schritt 71 challengeType: 0 dashedName: step-71 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3f718b5f8dc102cd528e.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3f718b5f8dc102cd528e.md index e8de07b79d4..752f4ed7213 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3f718b5f8dc102cd528e.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3f718b5f8dc102cd528e.md @@ -1,6 +1,6 @@ --- id: 646d3f718b5f8dc102cd528e -title: Step 72 +title: Schritt 72 challengeType: 0 dashedName: step-72 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d40c543943ec250039682.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d40c543943ec250039682.md index 4973e069b9c..2e191b06f83 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d40c543943ec250039682.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d40c543943ec250039682.md @@ -1,6 +1,6 @@ --- id: 646d40c543943ec250039682 -title: Step 74 +title: Schritt 74 challengeType: 0 dashedName: step-74 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d40fe4b7b50c30c2b4cd8.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d40fe4b7b50c30c2b4cd8.md index 01767a99e03..8cf0c8eabc2 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d40fe4b7b50c30c2b4cd8.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d40fe4b7b50c30c2b4cd8.md @@ -1,6 +1,6 @@ --- id: 646d40fe4b7b50c30c2b4cd8 -title: Step 75 +title: Schritt 75 challengeType: 0 dashedName: step-75 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d41e23b583fc3b8cc4579.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d41e23b583fc3b8cc4579.md index 7fe83fcacfb..a5481502fcd 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d41e23b583fc3b8cc4579.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d41e23b583fc3b8cc4579.md @@ -1,6 +1,6 @@ --- id: 646d41e23b583fc3b8cc4579 -title: Step 76 +title: Schritt 76 challengeType: 0 dashedName: step-76 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d423fade4a9c4636acd13.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d423fade4a9c4636acd13.md index cbd2f59f0dc..01c57c3196d 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d423fade4a9c4636acd13.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d423fade4a9c4636acd13.md @@ -1,6 +1,6 @@ --- id: 646d423fade4a9c4636acd13 -title: Step 77 +title: Schritt 77 challengeType: 0 dashedName: step-77 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d43587d926bc5b6cb2e50.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d43587d926bc5b6cb2e50.md index b9387c25525..caaa32ff779 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d43587d926bc5b6cb2e50.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d43587d926bc5b6cb2e50.md @@ -1,6 +1,6 @@ --- id: 646d43587d926bc5b6cb2e50 -title: Step 79 +title: Schritt 79 challengeType: 0 dashedName: step-79 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d44da986f2bc9b72f5fe2.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d44da986f2bc9b72f5fe2.md index 7a4d6806f2b..948b9836429 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d44da986f2bc9b72f5fe2.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d44da986f2bc9b72f5fe2.md @@ -1,6 +1,6 @@ --- id: 646d44da986f2bc9b72f5fe2 -title: Step 81 +title: Schritt 81 challengeType: 0 dashedName: step-81 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4554721d43cb19a68bc4.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4554721d43cb19a68bc4.md index 5900d07b82b..e23d35333ee 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4554721d43cb19a68bc4.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4554721d43cb19a68bc4.md @@ -1,6 +1,6 @@ --- id: 646d4554721d43cb19a68bc4 -title: Step 83 +title: Schritt 83 challengeType: 0 dashedName: step-83 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d45ee725632cca2555146.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d45ee725632cca2555146.md index b44378895e2..897a7c1274f 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d45ee725632cca2555146.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d45ee725632cca2555146.md @@ -1,6 +1,6 @@ --- id: 646d45ee725632cca2555146 -title: Step 85 +title: Schritt 85 challengeType: 0 dashedName: step-85 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4626420eeecd51f241c2.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4626420eeecd51f241c2.md index 07688aaca12..49c28b4d8eb 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4626420eeecd51f241c2.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4626420eeecd51f241c2.md @@ -1,6 +1,6 @@ --- id: 646d4626420eeecd51f241c2 -title: Step 86 +title: Schritt 86 challengeType: 0 dashedName: step-86 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d467c6994f4ce0dc416a4.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d467c6994f4ce0dc416a4.md index 8d640506e46..9958fe23133 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d467c6994f4ce0dc416a4.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d467c6994f4ce0dc416a4.md @@ -1,6 +1,6 @@ --- id: 646d467c6994f4ce0dc416a4 -title: Step 87 +title: Schritt 87 challengeType: 0 dashedName: step-87 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d46c03e7d02cecb30f021.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d46c03e7d02cecb30f021.md index a01fe855aed..f7f0af358cc 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d46c03e7d02cecb30f021.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d46c03e7d02cecb30f021.md @@ -1,6 +1,6 @@ --- id: 646d46c03e7d02cecb30f021 -title: Step 88 +title: Schritt 88 challengeType: 0 dashedName: step-88 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d47c8f58107d10f1e5106.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d47c8f58107d10f1e5106.md index 2b8ba01ca6f..21f96198c8a 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d47c8f58107d10f1e5106.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d47c8f58107d10f1e5106.md @@ -1,6 +1,6 @@ --- id: 646d47c8f58107d10f1e5106 -title: Step 91 +title: Schritt 91 challengeType: 0 dashedName: step-91 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d486aec20f7d2a581cc36.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d486aec20f7d2a581cc36.md index 42ac008ff41..d901140d646 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d486aec20f7d2a581cc36.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d486aec20f7d2a581cc36.md @@ -1,6 +1,6 @@ --- id: 646d486aec20f7d2a581cc36 -title: Step 93 +title: Schritt 93 challengeType: 0 dashedName: step-93 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d498c8ebc31d3f753b22e.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d498c8ebc31d3f753b22e.md index 0dd57f1224b..109c906b6d6 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d498c8ebc31d3f753b22e.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d498c8ebc31d3f753b22e.md @@ -1,6 +1,6 @@ --- id: 646d498c8ebc31d3f753b22e -title: Step 95 +title: Schritt 95 challengeType: 0 dashedName: step-95 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d49bfff9079d4b38df115.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d49bfff9079d4b38df115.md index 2a2788f4b10..82408dd9f43 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d49bfff9079d4b38df115.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d49bfff9079d4b38df115.md @@ -1,6 +1,6 @@ --- id: 646d49bfff9079d4b38df115 -title: Step 96 +title: Schritt 96 challengeType: 0 dashedName: step-96 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4ab9b3b4c5d74fdd2154.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4ab9b3b4c5d74fdd2154.md index d89f6df3612..e61e4bc0530 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4ab9b3b4c5d74fdd2154.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4ab9b3b4c5d74fdd2154.md @@ -1,6 +1,6 @@ --- id: 646d4ab9b3b4c5d74fdd2154 -title: Step 101 +title: Schritt 101 challengeType: 0 dashedName: step-101 --- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4b3d80ea98d824c8a4f9.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4b3d80ea98d824c8a4f9.md index edb35c09bd0..5a7078cc8b6 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4b3d80ea98d824c8a4f9.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4b3d80ea98d824c8a4f9.md @@ -1,6 +1,6 @@ --- id: 646d4b3d80ea98d824c8a4f9 -title: Step 102 +title: Schritt 102 challengeType: 0 dashedName: step-102 --- diff --git a/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-a.md b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-a.md new file mode 100644 index 00000000000..81cc2d54518 --- /dev/null +++ b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-a.md @@ -0,0 +1,45 @@ +--- +id: 64a5529c02815a7d323aab88 +title: The Box Model Question A +challengeType: 15 +dashedName: the-box-model-question-a +--- + +# --description-- + +Being able to inspect and debug your HTML and CSS is critical to frontend development. This lesson will take us through the Chrome Dev Tools, which allow you to see detailed information about your elements and CSS rules, as well as assist you in finding and fixing problems in your code. + +To open up the inspector, you can right-click on any element of a webpage and click “Inspect” or press F12. Go ahead and do that right now to see the HTML and CSS used on this page. + +Don’t get overwhelmed with all the tools you’re now seeing! For this lesson, we want to focus on the Elements and Styles panes. + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +Which panes should you focus on in the Chrome Dev Tools for inspecting and debugging HTML and CSS? + +## --answers-- + +Console and Network + +--- + +Elements and Styles + +--- + +Sources and Application + +--- + +Performance and Memory + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-b.md b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-b.md new file mode 100644 index 00000000000..c830844ef5e --- /dev/null +++ b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-b.md @@ -0,0 +1,42 @@ +--- +id: 64a553ed02815a7d323aab89 +title: The Box Model Question B +challengeType: 15 +dashedName: the-box-model-question-b +--- + +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --text-- + +When inspecting an element in the Chrome Dev Tools, if a style property is shown with a strikethrough, what does it indicate? + +## --answers-- + +The style property is currently disabled and not applied to the element. + +--- + +The style property is overridden by a more specific CSS rule. + +--- + +The style property is deprecated and should not be used. + +--- + +The style property is experimental and may not be supported by all browsers + +## --video-solution-- + +2 diff --git a/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-c.md b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-c.md new file mode 100644 index 00000000000..84cee19aea0 --- /dev/null +++ b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-c.md @@ -0,0 +1,46 @@ +--- +id: 64a5551d02815a7d323aab8a +title: The Box Model Question C +challengeType: 15 +dashedName: the-box-model-question-c +--- +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +Which feature in the Elements pane allows you to select any element on a webpage by hovering over it? + +## --answers-- + +Blue-highlighted icon + +--- + +Styles tab + +--- + +Inspector tab + +--- + +HTML structure view + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-d.md b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-d.md new file mode 100644 index 00000000000..4d882631471 --- /dev/null +++ b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-d.md @@ -0,0 +1,47 @@ +--- +id: 64a55a6102815a7d323aab8b +title: The Box Model Question D +challengeType: 15 +dashedName: the-box-model-question-d +--- +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +In the Styles pane, what information can you view about an element when it is selected? + +## --answers-- + +HTML structure and CSS rules + +--- + +Styles tab + +--- + +Inspector tab + +--- + +Applied styles and overwritten styles. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-e.md b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-e.md new file mode 100644 index 00000000000..7db2559056a --- /dev/null +++ b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-e.md @@ -0,0 +1,38 @@ +--- +id: 64a669f77a7d00f97013ed0c +title: The Box Model Question E +challengeType: 15 +dashedName: the-box-model-question-e +--- +# --description-- + +Now that you understand the basic syntax of HTML and CSS, we’re going to get serious. The most important skills you need to master with CSS are positioning and layout. Changing fonts and colors is a crucial skill, but being able to put things exactly where you want them on a webpage is even more crucial. After all, how many webpages can you find where absolutely every element is just stacked one on top of another? + +Learning to position elements on a webpage is not that difficult once you understand just a few key concepts. Unfortunately, many learners race through learning HTML and CSS to get to JavaScript and end up missing these fundamental concepts. This leads to frustration, pain, (and funny gifs) because all the JavaScript skills in the world are meaningless if you can’t stick your elements on the page where you need them to be. So with that in mind, let’s get started. + +# --question-- + +## --text-- + +Why is it important to have a solid understanding of CSS in web development? + +## --answers-- + +It allows you to create complex animations and interactive effects. + +--- + +It allows you to create complex animations and interactive effects. + +--- + +It helps in optimizing database queries for improved performance. + +--- + +It enables you to style and design webpages with precision and control. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-f.md b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-f.md new file mode 100644 index 00000000000..a91d049aee3 --- /dev/null +++ b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-f.md @@ -0,0 +1,49 @@ +--- +id: 64a66c917a7d00f97013ed0d +title: The Box Model Question F +challengeType: 15 +dashedName: the-box-model-question-f +--- +# --description-- + +The first important concept that you need to understand to be successful in CSS is the box model. It isn’t complicated, but skipping over it now will cause you much frustration down the line. + +Every single thing on a webpage is a rectangular box. These boxes can have other boxes in them and can sit alongside one another. You can get a rough idea of how this works by sticking a border on every item on the page like this: + +```css +* { + border: 1px solid red; +} +``` + + +# --question-- + +## --assignment-- + +Add a border to every element on the page and see how the boxes are laid out. + +## --text-- + +What is the fundamental concept in CSS that helps you understand the structure of elements as rectangular boxes? + +## --answers-- + +Box-sizing + +--- + +Box-shadow + +--- + +Box model + +--- + +Border-box + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-g.md b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-g.md new file mode 100644 index 00000000000..b8c981a7aa9 --- /dev/null +++ b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-g.md @@ -0,0 +1,52 @@ +--- +id: 64a6702e7a7d00f97013ed0e +title: The Box Model Question G +challengeType: 15 +dashedName: the-box-model-question-g +--- +# --description-- + +![lines](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/odin-lined.png) + +OK, so there might be some circles in the above image… but when it comes to layout, they fit together like rectangular boxes and not circles. In the end, laying out a webpage and positioning all its elements is deciding how you are going to nest and stack these boxes. + +The only real complication here is that there are many ways to manipulate the size of these boxes, and the space between them, using padding, margin, and border. But to sum it up briefly: + +- `padding` increases the space between the border of a box and the content of the box. +- `margin` increases the space between the borders of a box and the borders of adjacent boxes. +- `border` adds space (even if it’s only a pixel or two) between the margin and the padding. + +Be sure to study the diagrams carefully. + +![the box model](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/box-model.png) + +# --question-- + +## --assignment-- + +Add a border to every element on the page and see how the boxes are laid out. + +## --text-- + +From inside to outside, what is the order of box-model properties? + +## --answers-- + +Content, Margin, Padding, Border + +--- + +Margin, Padding, Content, Border + +--- + +Content, Padding, Border, Margin + +--- + +Padding, Content, Border, Margin + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-h.md b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-h.md new file mode 100644 index 00000000000..3c711550b34 --- /dev/null +++ b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-h.md @@ -0,0 +1,37 @@ +--- +id: 64a674937a7d00f97013ed0f +videoId: rIO5326FgPE +title: The Box Model Question H +challengeType: 15 +dashedName: the-box-model-question-h +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +What does the box-sizing CSS property do? + +## --answers-- + +It determines the order of the box-model properties. + +--- + +It specifies the position of an element on the webpage. + +--- + +It controls how the total width and height of an element are calculated. + +--- + +It sets the background color of an element. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-i.md b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-i.md new file mode 100644 index 00000000000..026ca2c2034 --- /dev/null +++ b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-i.md @@ -0,0 +1,36 @@ +--- +id: 64a6749a7a7d00f97013ed10 +videoId: rIO5326FgPE +title: The Box Model Question I +challengeType: 15 +dashedName: the-box-model-question-i +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +What is the difference between the standard and alternative box model? + +## --answers-- + +The standard box model calculates the width and height of an element based on the content alone, while the alternative box model calculates based on the content plus padding and border. + +--- + +The standard box model includes content, padding, and border, while the alternative box model includes only the content. + +--- + +The standard box model and the alternative box model are the same and have no differences. + +--- + +The standard box model includes only the content, while the alternative box model includes content, padding, and border. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-j.md b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-j.md new file mode 100644 index 00000000000..990fedec175 --- /dev/null +++ b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-j.md @@ -0,0 +1,37 @@ +--- +id: 64a674a47a7d00f97013ed11 +videoId: rIO5326FgPE +title: The Box Model Question J +challengeType: 15 +dashedName: the-box-model-question-j +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Would you use margin or padding to create more space between 2 elements? + +## --answers-- + +Padding + +--- + +Both margin and padding can be used interchangeably + +--- + +Neither margin nor padding can be used to create more space between elements + +--- + +Margin + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-k.md b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-k.md new file mode 100644 index 00000000000..933a01523c2 --- /dev/null +++ b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-k.md @@ -0,0 +1,36 @@ +--- +id: 64a674ac7a7d00f97013ed12 +videoId: rIO5326FgPE +title: The Box Model Question K +challengeType: 15 +dashedName: the-box-model-question-k +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Which CSS property would you use to create more space between the contents of an element and its border? + +## --answers-- + +Margin + +--- + +Padding + +--- + +Border + +--- + +Float + +## --video-solution-- + +2 diff --git a/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-l.md b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-l.md new file mode 100644 index 00000000000..80dfdc527af --- /dev/null +++ b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-l.md @@ -0,0 +1,28 @@ +--- +id: 64a674b97a7d00f97013ed13 +videoId: rIO5326FgPE +title: The Box Model Question L +challengeType: 15 +dashedName: the-box-model-question-l +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Would you use margin or padding if you wanted two elements to overlap each other? + +## --answers-- + +Padding + +--- + +Margin + +## --video-solution-- + +2 diff --git a/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-m.md b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-m.md new file mode 100644 index 00000000000..c55213cfd1b --- /dev/null +++ b/curriculum/challenges/german/16-the-odin-project/top-the-box-model/the-box-model-question-m.md @@ -0,0 +1,67 @@ +--- +id: 64a674c27a7d00f97013ed14 +videoId: rIO5326FgPE +title: The Box Model Question M +challengeType: 15 +dashedName: the-box-model-question-m +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +How do you set the alternative box model for all of your elements? + +## --answers-- + +```css +html { + box-sizing: inherit; +} +*, +*::before, +*::after { + box-sizing: border-box; +} +``` + +--- + +```css +* { + box-sizing: border-box; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +* { + box-sizing: inherit; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +*, +*::before, +*::after { + box-sizing: inherit; +} +``` + + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/german/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md b/curriculum/challenges/german/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md index 9793d760c20..93e60e4d425 100644 --- a/curriculum/challenges/german/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md +++ b/curriculum/challenges/german/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md @@ -62,5 +62,70 @@ doubleBasePalindromes(1000000); # --solutions-- ```js -// solution required +function buildPalindromesBase10(len) { + // Base cases + const palindromes = []; + if (len > 0) { + palindromes.push([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]); + } + if (len > 1) { + palindromes.push([11, 22, 33, 44, 55, 66, 77, 88, 99, 0]); + } + + for (let i = 3; i <= len; i++) { + const lengthIPalindromes = []; + + for (let j = 1; j < 10; j++) { + const firstDigit = j * (10 ** (i - 1)); + const lastDigit = j; + // Build off of palindromes 2 digits shorter + { + const shorterPalindromes = palindromes[i - 3]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 10 + lastDigit); + } + } + // Build off of palindromes 4 digits shorter + if (i > 4) { + const shorterPalindromes = palindromes[i - 5]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 100 + lastDigit); + } + } + } + palindromes.push(lengthIPalindromes); + } + return palindromes.flat(); +} + +function isPalindrome(num) { + const numAsString = num.toString(); + const numDigits = numAsString.length; + for (let i = 0; i < numDigits / 2; i++) { + if (numAsString[i] !== numAsString[numDigits - 1 - i]) { + return false; + } + } + return true; +} + +function isPalindromeBase2(num) { + return isPalindrome(num.toString(2)); +} + +function doubleBasePalindromes(n) { + let palindromeSum = 0; + const maxDigits = Math.ceil(Math.log10(n)); + const palindromesBase10 = buildPalindromesBase10(maxDigits); + + // Loop over all palindromes less than n + for (let i = 0; i < palindromesBase10.length && palindromesBase10[i] < n; i++) { + if (isPalindromeBase2(palindromesBase10[i])) { + palindromeSum += palindromesBase10[i]; + } + } + return palindromeSum; +} ``` diff --git a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md index 42204ce06e4..0ca07afaf8b 100644 --- a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md +++ b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md @@ -39,23 +39,16 @@ Il tuo codice non dovrebbe usare il metodo `splice`. assert(!code.match(/\.?[\s\S]*?splice/g)); ``` -L'array `inputCities` non dovrebbe cambiare. +Non dovresti mutare l'array originale passato alla funzione. ```js -assert( - JSON.stringify(inputCities) === - JSON.stringify(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) -); +assert.deepEqual(_inputCities, ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]); ``` `nonMutatingSplice(["Chicago", "Delhi", "Islamabad", "London", "Berlin"])` dovrebbe restituire `["Chicago", "Delhi", "Islamabad"]`. ```js -assert( - JSON.stringify( - nonMutatingSplice(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) - ) === JSON.stringify(['Chicago', 'Delhi', 'Islamabad']) -); +assert.deepEqual(nonMutatingSplice(_inputCities), ["Chicago", "Delhi", "Islamabad"]); ``` # --seed-- @@ -64,14 +57,15 @@ assert( ```js function nonMutatingSplice(cities) { - // Only change code below this line + return cities.splice(3); - - // Only change code above this line } +``` -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; -nonMutatingSplice(inputCities); +## --after-user-code-- + +```js +const _inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` # --solutions-- @@ -80,5 +74,4 @@ nonMutatingSplice(inputCities); function nonMutatingSplice(cities) { return cities.slice(0,3); } -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` diff --git a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person.md b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person.md index 3f74cd3d62e..6b21631081a 100644 --- a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person.md +++ b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person.md @@ -19,7 +19,7 @@ setLastName(last) setFullName(first, last) ``` -Esegui i test per vedere l'output atteso per ogni metodo. These methods must be the only available means of interacting with the object. Each test will declare a new `Person` instance as `new Person('Bob', 'Ross')`. +Esegui i test per vedere l'output atteso per ogni metodo. Questi metodi devono essere gli unici mezzi disponibili per interagire con l'oggetto. Ogni test dichiarerà una nuova istanza `Person` come `new Person('Bob', 'Ross')`. # --hints-- @@ -29,19 +29,19 @@ You should not change the function signature. assert.match(code, /const\s+Person\s*=\s*function\s*\(\s*first\s*,\s*last\s*\)\s*{/); ``` -You should not reassign the `first` parameter. +Non dovresti riassegnare il parametro `first`. ```js assert.notMatch(code, /first\s*=\s*/); ``` -You should not reassign the `last` parameter. +Non dovresti riassegnare il parametro `last`. ```js assert.notMatch(code, /last\s*=\s*/); ``` -No properties should be added. `Object.keys(Person).length` should always return 6. +Nessuna proprietà dovrebbe essere aggiunta. `Object.keys(Person).length` dovrebbe sempre restituire 6. ```js const person = new Person('Bob', 'Ross'); @@ -51,49 +51,49 @@ person.setFullName('John', 'Smith'); assert.lengthOf(Object.keys(person), 6); ``` -You should be able to instantiate your `Person` object. +Dovresti essere in grado di istanziare il tuo oggetto `Person`. ```js const person = new Person('Bob', 'Ross'); assert.instanceOf(person, Person); ``` -Your `Person` object should not have a `firstName` property. +L'oggetto `Person` non dovrebbe avere una proprietà `firstName`. ```js const person = new Person('Bob', 'Ross'); assert.notProperty(person, 'firstName'); ``` -Your `Person` object should not have a `lastName` property. +L'oggetto `Person` non dovrebbe avere una proprietà `lastName`. ```js const person = new Person('Bob', 'Ross'); assert.notProperty(person, 'lastName'); ``` -The `.getFirstName()` method should return the string `Bob`. +Il metodo `.getFirstName()` dovrebbe restituire la stringa `Bob`. ```js const person = new Person('Bob', 'Ross'); assert.strictEqual(person.getFirstName(), 'Bob'); ``` -The `.getLastName()` should return the string `Ross`. +`.getLastName()` dovrebbe restituire la stringa `Ross`. ```js const person = new Person('Bob', 'Ross'); assert.strictEqual(person.getLastName(), 'Ross'); ``` -The `.getFullName()` method should return the string `Bob Ross`. +Il metodo `.getFullName()` dovrebbe restituire la stringa `Bob Ross`. ```js const person = new Person('Bob', 'Ross'); assert.strictEqual(person.getFullName(), 'Bob Ross'); ``` -The `.getFullName()` method should return the string `Haskell Ross` after calling `.setFirstName('Haskell')`. +Il metodo `.getFullName()` dovrebbe restituire la stringa `Haskell Ross` dopo aver chiamato `.setFirstName('Haskell')`. ```js const person = new Person('Bob', 'Ross'); @@ -101,7 +101,7 @@ person.setFirstName('Haskell'); assert.strictEqual(person.getFullName(), 'Haskell Ross'); ``` -The `.getFullName()` method should return the string `Bob Curry` after calling `.setLastName('Curry')`. +Il metodo `.getFullName()` dovrebbe restituire la stringa `Bob Curry` dopo aver chiamato `.setLastName('Curry')`. ```js const person = new Person('Bob', 'Ross'); @@ -109,7 +109,7 @@ person.setLastName('Curry'); assert.strictEqual(person.getFullName(), 'Bob Curry'); ``` -The `.getFullName()` method should return the string `Haskell Curry` after calling `.setFullName('Haskell', 'Curry')`. +Il metodo `.getFullName()` dovrebbe restituire la stringa `Haskell Curry` dopo aver chiamato `.setFullName('Haskell', 'Curry')`. ```js const person = new Person('Bob', 'Ross'); @@ -117,7 +117,7 @@ person.setFullName('Haskell', 'Curry'); assert.strictEqual(person.getFullName(), 'Haskell Curry'); ``` -The `.getFirstName()` method should return the string `Haskell` after calling `.setFullName('Haskell', 'Curry')`. +Il metodo `.getFirstName()` deve restituire la stringa `Haskell` dopo aver chiamato `.setFullName('Haskell', 'Curry')`. ```js const person = new Person('Bob', 'Ross'); @@ -125,7 +125,7 @@ person.setFullName('Haskell', 'Curry'); assert.strictEqual(person.getFirstName(), 'Haskell'); ``` -The `.getLastName()` method should return the string `Curry` after calling `.setFullName('Haskell', 'Curry')`. +Il metodo `.getLastName()` dovrebbe restituire la stringa `Curry` dopo aver chiamato `.setFullName('Haskell', 'Curry')`. ```js const person = new Person('Bob', 'Ross'); @@ -133,7 +133,7 @@ person.setFullName('Haskell', 'Curry'); assert.strictEqual(person.getLastName(), 'Curry'); ``` -The `.getFullName()` method should return the string `Emily Martinez de la Rosa` after calling `.setFullName('Emily Martinez', 'de la Rosa')`. +Il metodo `.getFullName()` dovrebbe restituire la stringa `Emily Martinez de la Rosa` dopo aver chiamato `.setFullName('Emily Martinez', 'de la Rosa')`. ```js const person = new Person('Bob', 'Ross'); @@ -141,7 +141,7 @@ person.setFullName('Emily Martinez', 'de la Rosa'); assert.strictEqual(person.getFullName(), 'Emily Martinez de la Rosa'); ``` -The `.getFirstName()` property should return the string `Emily Martinez` after calling `.setFullName('Emily Martinez', 'de la Rosa')`. +La proprietà `.getFirstName()` dovrebbe restituire la stringa `Emily Martinez` dopo aver chiamato `.setFullName('Emily Martinez', 'de la Rosa')`. ```js const person = new Person('Bob', 'Ross'); @@ -149,7 +149,7 @@ person.setFullName('Emily Martinez', 'de la Rosa'); assert.strictEqual(person.getFirstName(), 'Emily Martinez'); ``` -The `.getLastName()` property should return the string `de la Rosa` after calling `.setFullName('Emily Martinez', 'de la Rosa')`. +La proprietà `.getLastName()` dovrebbe restituire la stringa `de la Rosa` dopo aver chiamato `.setFullName('Emily Martinez', 'de la Rosa')`. ```js const person = new Person('Bob', 'Ross'); diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148defa9c01520fb9d178a0.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148defa9c01520fb9d178a0.md index 83ebb4858ff..b335855b990 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148defa9c01520fb9d178a0.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148defa9c01520fb9d178a0.md @@ -7,7 +7,7 @@ dashedName: step-61 # --description-- -While `ul`/`li` elements are great at providing bullets for list items, your radio buttons don't need them. You can control what the bullets look with the `list-style` property. For example you can turn your bullets into circles with the following: +Mentre gli elementi `ul`/`li` sono ottimi per i punti degli elementi della lista, i pulsanti di opzione non ne hanno bisogno. Puoi controllare l'aspetto dei punti con la proprietà `list-style`. Ad esempio, puoi trasformare i punti in cerchi come segue: ```css ul { @@ -15,23 +15,23 @@ ul { } ``` -Remove the default styling for the `.answers-list` items by settings its style to `none`, and remove the unordered list padding. +Rimuovi lo stile predefinito per gli elementi `.answers-list` impostando il loro stile su `none` e rimuovi il padding per la lista non ordinata. # --hints-- -You should use the `.answers-list` selector. +Dovresti usare il selettore `.answers-list`. ```js assert.exists(new __helpers.CSSHelp(document).getStyle('.answers-list')); ``` -You should give `.answers-list` a `list-style` of `none`. +Dovresti dare ad `.answers-list` una proprietà `list-style` con il valore `none`. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.answers-list')?.listStyle, 'none'); ``` -You should give `.answers-list` a `padding` of `0`. +Dovresti dare ad `.answers-list` un `padding` di `0`. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.answers-list')?.padding, '0px'); diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa30b9eacea3f48c6300ad.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa30b9eacea3f48c6300ad.md index 61d2f525d5e..677ebd3721f 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa30b9eacea3f48c6300ad.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa30b9eacea3f48c6300ad.md @@ -29,7 +29,7 @@ L'elemento di ancoraggio (`a`) dovrebbe avere un tag di apertura. I tag di apert assert(document.querySelectorAll('a').length >= 2); ``` -You are missing a closing (`a`) tag after the image. +Ti manca un tag di chiusura (`a`) dopo l'immagine. ```js assert(document.querySelectorAll('a').length === 2); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345b810a6e481e5e326849.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345b810a6e481e5e326849.md index dc0a283a680..a6856a35dce 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345b810a6e481e5e326849.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345b810a6e481e5e326849.md @@ -7,49 +7,49 @@ dashedName: step-12 # --description-- -`range()` will return an array of numbers, which you need to convert back into characters. Chain the `.map()` method to your `range()` call. +`range()` restituirà un array di numeri, che dovrai riconvertire in caratteri. Concatena il metodo `.map()` alla chiamata `range()`. -Pass a callback function that takes `code` as the parameter and implicitly returns the value of passing `code` to the `String.fromCharCode()` method. +Passa una funzione callback che prende `code` come parametro e restituisce implicitamente il valore ottenuto passando `code` al metodo `String.fromCharCode()`. # --hints-- -You should use the `.map()` method. +Dovresti usare il metodo `.map()`. ```js assert.lengthOf(code.match(/\.map\(/g), 2); ``` -You should chain the `.map()` method to your `range` call. +Dovresti concatenare il metodo `.map()` alla chiamata di `range`. ```js assert.match(code, /const\s*charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\.charCodeAt\(\s*0\s*\)\s*,\s*end\.charCodeAt\(\s*0\s*\)\s*\)\.map\(/); ``` -You should use arrow syntax for the `.map()` callback. +Dovresti usare la sintassi freccia per la callback di `.map()`. ```js assert.match(code, /const\s*charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\.charCodeAt\(\s*0\s*\)\s*,\s*end\.charCodeAt\(\s*0\s*\)\s*\).map\(\s*\(?.*\)?\s*=>/); ``` -Your `.map()` callback should take a `code` parameter. +La callback di `.map()` dovrebbe prendere un parametro `code`. ```js assert.match(code, /const\s*charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\.charCodeAt\(\s*0\s*\)\s*,\s*end\.charCodeAt\(\s*0\s*\)\s*\).map\(\s*\(?\s*code\s*\)?\s*=>/); ``` -Your `.map()` callback should use an implicit return. +La callback di `.map()` dovrebbe utilizzare un return implicito. ```js assert.notMatch(code, /const\s*charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\.charCodeAt\(\s*0\s*\)\s*,\s*end\.charCodeAt\(\s*0\s*\)\s*\).map\(\s*\(?\s*code\s*\)?\s*=>\s*\{/); ``` -Your `.map()` callback should return the result of calling `String.fromCharCode()`. +La callback di `.map()` dovrebbe restituire il risultato della chiamata `String.fromCharCode()`. ```js assert.match(code, /const\s*charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\.charCodeAt\(\s*0\s*\)\s*,\s*end\.charCodeAt\(\s*0\s*\)\s*\).map\(\s*\(?\s*code\s*\)?\s*=>\s*String\.fromCharCode\(/); ``` -You should pass the variable `code` to `String.fromCharCode()`. +Dovresti passare la variabile `code` a `String.fromCharCode()`. ```js assert.match(code, /const\s*charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\.charCodeAt\(\s*0\s*\)\s*,\s*end\.charCodeAt\(\s*0\s*\)\s*\).map\(\s*\(?\s*code\s*\)?\s*=>\s*String\.fromCharCode\(\s*code\s*\)/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345c560591891f64976f7a.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345c560591891f64976f7a.md index 51d5bc5f178..e025fb195ff 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345c560591891f64976f7a.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345c560591891f64976f7a.md @@ -7,35 +7,35 @@ dashedName: step-13 # --description-- -Now that your helper functions are complete, back in your `onload` event handler you should declare a `letters` variable. Assign it the result of calling `charRange()` with the letters `A` and `J` as arguments. +Ora che le funzioni di supporto sono complete, nel gestore di eventi `onload` dovresti dichiarare una variabile `letters`. Assegnale il risultato della chiamata `charRange()` con le lettere `A` e `J` come argomenti. # --hints-- -You should declare a `letters` variable. +Dovresti dichiarare una variabile `letters`. ```js assert.match(code, /(?:let|const|var)\s*letters/); ``` -You should use `const` to declare your `letters` variable. +Dovresti usare la parola chiave `const` per dichiarare la variabile `letters`. ```js assert.match(code, /const\s*letters/); ``` -You should assign a `charRange()` call to your `letters` variable. +Dovresti assegnare una chiamata `charRange()` alla variabile `letters`. ```js assert.match(code, /const\s*letters\s*=\s*charRange\(/); ``` -You should pass `A` as the first argument to your `charRange()` call. +Dovresti passare `A` come primo argomento alla chiamata `charRange()`. ```js assert.match(code, /const\s*letters\s*=\s*charRange\(\s*('|"|`)A\1/); ``` -You should pass `J` as the second argument to your `charRange()` call. +Dovresti passare `J` come secondo argomento alla chiamata `charRange()`. ```js assert.match(code, /const\s*letters\s*=\s*charRange\(\s*('|"|`)A\1\s*,\s*('|"|`)J\2\s*\)/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64347464f78cd9209545f35c.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64347464f78cd9209545f35c.md index 93f8895d535..e30b93fe070 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64347464f78cd9209545f35c.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64347464f78cd9209545f35c.md @@ -7,25 +7,25 @@ dashedName: step-14 # --description-- -Now call the `.forEach()` method of your `letters` array, and pass your `createLabel` function reference as the callback. +Ora chiama il metodo `.forEach()` sull'array `letters` e passa il riferimento alla funzione `createLabel` come callback. -You should see some letters appear across the top of your spreadsheet. +Dovresti veder apparire alcune lettere nella parte superiore del foglio di calcolo. # --hints-- -You should call the `.forEach()` method on your `letters` array. +Dovresti chiamare il metodo `.forEach()` sull'array `letters`. ```js assert.match(code, /letters\.forEach\(/); ``` -You should pass your `createLabel` function reference to the `.forEach()` method. +Dovresti passare al metodo `.forEach()` il riferimento alla funzione `createLabel`. ```js assert.match(code, /letters\.forEach\(\s*createLabel\s*\)/); ``` -You should not pass a `createLabel` function call. +Non dovresti passare una chiamata della funzione `createLabel`. ```js assert.notMatch(code, /letters\.forEach\(\s*createLabel\(\s*\)\s*\)/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434750c53db16218f41e6e1.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434750c53db16218f41e6e1.md index ee5b7a363f8..2799b9cc4f9 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434750c53db16218f41e6e1.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434750c53db16218f41e6e1.md @@ -7,43 +7,43 @@ dashedName: step-15 # --description-- -Remember that `range()` returns an array, so you can chain array methods directly to the function call. +Ricorda che `range()` restituisce un array, quindi puoi concatenare i metodi per array direttamente alla chiamata della funzione. -Call `range()` with `1` and `99` as the arguments, and chain the `.forEach()` method. Pass the `.forEach()` method an empty callback which takes `number` as the parameter. +Chiama `range()` con `1` e `99` come argomenti e concatena il metodo `.forEach()`. Passa al metodo `.forEach()` una callback vuota che prende come parametro `number`. # --hints-- -You should call your `range()` function. +Dovresti chiamare la funzione `range()`. ```js assert.lengthOf(code.match(/range\(/g), 2); ``` -You should pass `1` as the first argument to your `range()` call. +Dovresti passare `1` come primo argomento alla chiamata di `range()`. ```js assert.match(code, /range\(\s*1/); ``` -You should pass `99` as the second argument to your `range()` call. +Dovresti passare `99` come secondo argomento alla chiamata di `range()`. ```js assert.match(code, /range\(\s*1\s*,\s*99\s*\)/); ``` -You should chain the `.forEach()` method to your `range()` call. +Dovresti concatenare il metodo `.forEach()` alla chiamata di `range()`. ```js assert.match(code, /range\(\s*1\s*,\s*99\s*\)\.forEach\(/); ``` -You should pass a callback function to `.forEach()` using arrow syntax. +Dovresti passare una funzione callback a `.forEach()` usando la sintassi freccia. ```js assert.match(code, /range\(\s*1\s*,\s*99\s*\)\.forEach\(\s*\(?.*\)?\s*=>/); ``` -Your callback function should have `number` as the only parameter. +La funzione callback dovrebbe avere `number` come unico parametro. ```js assert.match(code, /range\(\s*1\s*,\s*99\s*\)\.forEach\(\s*\(?\s*number\s*\)?\s*=>/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434759f78ec812264ff8f34.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434759f78ec812264ff8f34.md index 68ac4adb75e..f4d92e9297a 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434759f78ec812264ff8f34.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434759f78ec812264ff8f34.md @@ -7,43 +7,43 @@ dashedName: step-16 # --description-- -In your callback, call `createLabel()` and pass `number` as the argument. You should see some numbers appear in your spreadsheet. +Nella tua callback, chiama `createLabel()` e passa `number` come argomento. Dovresti vedere alcuni numeri apparire nel foglio di calcolo. -Then call the `.forEach()` method on your `letters` array. Pass an empty callback function which takes a `letter` argument. +Quindi chiama il metodo `.forEach()` sull'array `letters`. Passa una funzione callback vuota che prende un argomento `letter`. # --hints-- -You should call your `createLabel()` function. +Dovresti chiamare la funzione `createLabel()`. ```js assert.match(code, /range\(\s*1\s*,\s*99\s*\)\.forEach\(\s*\(?\s*number\s*\)?\s*=>\s*\{\s*createLabel\(/); ``` -You should pass `number` to your `createLabel()` call. +Dovresti passare `number` alla chiamata `createLabel()`. ```js assert.match(code, /range\(\s*1\s*,\s*99\s*\)\.forEach\(\s*\(?\s*number\s*\)?\s*=>\s*\{\s*createLabel\(/) ``` -You should call the `.forEach()` method on your `letters` array. +Dovresti chiamare il metodo `.forEach()` sull'array `letters`. ```js assert.lengthOf(code.match(/letters\.forEach\(/g), 2) ``` -You should pass a callback function with arrow syntax to your `.forEach()` method. +Dovresti passare al metodo `.forEach()` una funzione callback con la sintassi freccia. ```js assert.match(code, /letters\.forEach\(\s*\(?.*\)?\s*=>\s*\{/) ``` -Your callback function should have a `letter` parameter. +La funzione callback dovrebbe avere un parametro `letter`. ```js assert.match(code, /letters\.forEach\(\s*\(?\s*letter\s*\)?\s*=>\s*\{/) ``` -Your callback function should be empty. +La funzione callback dovrebbe essere vuota. ```js assert.match(code, /letters\.forEach\(\s*\(?\s*letter\s*\)?\s*=>\s*\{\s*\}/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643475e13dc727231acd0f72.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643475e13dc727231acd0f72.md index f6179caf013..d9c24166ee2 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643475e13dc727231acd0f72.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643475e13dc727231acd0f72.md @@ -7,73 +7,73 @@ dashedName: step-17 # --description-- -Now in your nested `.forEach()` call, declare an `input` variable. Use the `.createElement()` method of the `document` object to create an `input` element. Set the `type` attribute to `text` and the `id` attribute to `letter + number`. +Ora nella chiamata `.forEach()` annidata, dichiara una variabile `input`. Usa il metodo `.createElement()` dell'oggetto `document` per creare un elemento `input`. Imposta l'attributo `type` su `text` e l'attributo `id` su `letter + number`. -For accessibility, set the `aria-label` attribute to the same value as the `id` attribute. +Per l'accessibilità, imposta l'attributo `aria-label` sullo stesso valore dell'attributo `id`. # --hints-- -You should declare an `input` variable. +Dovresti dichiarare una variabile `input`. ```js assert.match(code, /(?:var|let|const)\s*input/) ``` -You should use `const` to declare your `input` variable. +Dovresti usare `const` per dichiarare la variabile `input`. ```js assert.match(code, /const\s*input/) ``` -You should call the `.createElement()` method of the `document` object. +Dovresti chiamare il metodo `.createElement()` dell'oggetto `document`. ```js assert.lengthOf(code.match(/document\.createElement\(/g), 2) ``` -You should pass the string `input` to the `.createElement()` method. +Dovresti passare la stringa `input` al metodo `.createElement()`. ```js assert.match(code, /document\.createElement\(\s*('|"|`)input\1\s*\)/) ``` -You should assign your new `input` element to your `input` variable. +Dovresti assegnare il nuovo elemento `input` alla variabile `input`. ```js assert.match(code, /const\s*input\s*=\s*document\.createElement\(\s*('|"|`)input\1\s*\)/) ``` -You should access the `type` property of your `input` element. +Dovresti accedere alla proprietà `type` dell'elemento `input`. ```js assert.match(code, /input\.type/); ``` -You should set the `type` attribute of your `input` element to `text`. +Dovresti impostare l'attributo `type` dell'elemento `input` su `text`. ```js assert.match(code, /input\.type\s*=\s*('|"|`)text\1/) ``` -You should access the `id` property of your `input` element. +Dovresti accedere alla proprietà `id` dell'elemento `input`. ```js assert.match(code, /input\.id/); ``` -You should set the `id` attribute of your `input` element to `letter + number`. +Dovresti impostare l'attributo `id` dell'elemento `input` su `letter + number`. ```js assert.match(code, /input\.id\s*=\s*letter\s\+\snumber/) ``` -You should access the `ariaLabel` property of your `input` element. +Dovresti accedere alla proprietà `ariaLabel` dell'elemento `input`. ```js assert.match(code, /input\.ariaLabel/); ``` -You should set the `aria-label` attribute of your `input` element to `letter + number`. +Dovresti impostare l'attributo `aria-label` dell'elemento `input` su `letter + number`. ```js assert.match(code, /input\.ariaLabel\s*=\s*letter\s\+\snumber/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643498328cb52026123e2b91.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643498328cb52026123e2b91.md index f036d9ff9aa..043cf7f1d7c 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643498328cb52026123e2b91.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643498328cb52026123e2b91.md @@ -7,19 +7,19 @@ dashedName: step-18 # --description-- -Append the `input` element to your `container` element as a child. +Aggiungi l'elemento `input` all'elemento `container` come figlio. -You should now be able to see the cells of your spreadsheet. +Ora dovresti essere in grado di vedere le celle del foglio di calcolo. # --hints-- -You should call the `.appendChild()` method on your `container` element. +Dovresti chiamare il metodo `.appendChild()` sull'elemento `container`. ```js assert.lengthOf(code.match(/container\.appendChild\(/g), 2); ``` -You should pass your `input` element to the `.appendChild()` method. +Dovresti passare l'elemento `input` al metodo `.appendChild()`. ```js assert.match(code, /container\.appendChild\(\s*input\s*\)/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643498755d54c6279ba09078.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643498755d54c6279ba09078.md index c190c5df99e..ae3e99de6e3 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643498755d54c6279ba09078.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643498755d54c6279ba09078.md @@ -7,55 +7,55 @@ dashedName: step-19 # --description-- -Most spreadsheet programs include built-in functions for calculation. +La maggior parte dei programmi di fogli di calcolo includono funzioni integrate per il calcolo. -Declare a `sum` function that takes a `nums` parameter, which will be an array of numbers. It should return the result of calling `reduce` on the array to sum all of the numbers. +Dichiara una funzione `sum` che prende un parametro `nums`, che sarà un array di numeri. Dovrebbe restituire il risultato della chiamata di `reduce` sull'array per sommare tutti i numeri. # --hints-- -You should declare a `sum` variable. +Dovresti dichiarare una variabile `sum`. ```js assert.match(code, /(?:let|const|var)\s*sum/); ``` -You should use `const` to declare your `sum` variable. +Dovresti usare `const` per dichiarare la variabile `sum`. ```js assert.match(code, /const\s*sum/); ``` -Your `sum` variable should be a function. +La variabile `sum` dovrebbe essere una funzione. ```js assert.isFunction(sum); ``` -Your `sum` function should use arrow syntax. +La funzione `sum` dovrebbe utilizzare la sintassi freccia. ```js assert.match(code, /const\s*sum\s*=\(?.*\)?\s*=>/); ``` -Your `sum` function should have a `nums` parameter. +La funzione `sum` dovrebbe avere un parametro `nums`. ```js assert.match(code, /const\s*sum\s*=\s*\(?\s*nums\s*\)?\s*=>/); ``` -Your `sum` function should use an implicit return. +La funzione `sum` dovrebbe utilizzare un return implicito. ```js assert.notMatch(code, /const\s*sum\s*=\s*\(?\s*nums\s*\)?\s*=>\s*{/); ``` -Your `sum` function should return the result of calling `.reduce()` on `nums`. +La funzione `sum` dovrebbe restituire il risultato della chiamata `.reduce()` su `nums`. ```js assert.match(code, /const\s*sum\s*=\(?\s*nums\s*\)?\s*=>\s*nums\.reduce\(/); ``` -Your `sum` function should return the sum of all numbers in `nums`. +La funzione `sum` dovrebbe restituire la somma di tutti i numeri in `nums`. ```js const numbers = [1, 2, 3, 4, 5]; diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6437124c4c03dd4c8fb35d56.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6437124c4c03dd4c8fb35d56.md index 0380ef2a7aa..c11eec0b47c 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6437124c4c03dd4c8fb35d56.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6437124c4c03dd4c8fb35d56.md @@ -7,47 +7,47 @@ dashedName: step-20 # --description-- -Declare an `isEven` function, which takes a `num` parameter and returns `true` if the number is even, and `false` otherwise. Use the modulo operator `%` to determine if a number is even or odd. +Dichiara una funzione `isEven`, che prende un parametro `num` e restituisce `true` se il numero è pari, e `false` in caso contrario. Usa l'operatore di modulo `%` per determinare se un numero è pari o dispari. # --hints-- -You should declare an `isEven` variable. +Dovresti dichiarare una variabile `isEven`. ```js assert.match(code, /(?:let|const|var)\s*isEven/); ``` -You should use `const` to declare your `isEven` variable. +Dovresti usare `const` per dichiarare la variabile `isEven`. ```js assert.match(code, /const\s*isEven/); ``` -Your `isEven` variable should be a function. +La variabile `isEven` dovrebbe essere una funzione. ```js assert.isFunction(isEven); ``` -Your `isEven` function should use arrow syntax. +La funzione `isEven` dovrebbe utilizzare la sintassi freccia. ```js assert.match(code, /const\s*isEven\s*=\s*\(?.*\)?\s*=>/); ``` -Your `isEven` function should have a `num` argument. +La funzione `isEven` dovrebbe avere un argomento `num`. ```js assert.match(code, /const\s*isEven\s*=\s*\(?\s*num\s*\)?\s*=>/); ``` -Your `isEven` function should use the modulo operator `%`. +La funzione `isEven` dovrebbe utilizzare l'operatore di modulo `%`. ```js assert.match(isEven.toString(), /%/); ``` -Your `isEven` function should return `true` for even numbers. +La funzione `isEven` dovrebbe restituire `true` per numeri pari. ```js assert.isTrue(isEven(2)); @@ -55,7 +55,7 @@ assert.isTrue(isEven(1000)); assert.isTrue(isEven(42)); ``` -Your `isEven` function should return `false` for odd numbers. +La funzione `isEven` dovrebbe restituire `false` per numeri dispari. ```js assert.isFalse(isEven(1)); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6437133052eaf04d7300e622.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6437133052eaf04d7300e622.md index 1faf5d65bcf..d3d9a11efc7 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6437133052eaf04d7300e622.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6437133052eaf04d7300e622.md @@ -7,49 +7,49 @@ dashedName: step-21 # --description-- -Declare an `average` function which takes an array of numbers as the `nums` parameter. It should return the average of all the numbers in the array. +Dichiara una funzione `average` che prende un array di numeri come parametro `nums`. Dovrebbe restituire la media di tutti i numeri nell'array. -The average can be calculated by dividing the sum of all the numbers in the array by the length of the array. Remember that you have a `sum` function you can use. +La media può essere calcolata dividendo la somma di tutti i numeri nell'array per la lunghezza dell'array. Ricorda che hai una funzione `sum` che puoi usare. # --hints-- -You should declare an `average` variable. +Dovresti dichiarare una variabile `average`. ```js assert.match(code, /(?:let|const|var)\s+average/); ``` -You should use `const` to declare your `average` variable. +Dovresti usare `const` per dichiarare la variabile `average`. ```js assert.match(code, /const\s+average/); ``` -Your `average` variable should be a function. +La variabile `average` dovrebbe essere una funzione. ```js assert.isFunction(average); ``` -Your `average` function should use arrow syntax. +La funzione `average` dovrebbe utilizzare la sintassi freccia. ```js assert.match(code, /const\s+average\s*=\s*\(?.*\)?\s*=>/); ``` -Your `average` function should have a `nums` parameter. +La funzione `average` dovrebbe avere un parametro `nums`. ```js assert.match(code, /const\s+average\s*=\s*\(?\s*nums\s*\)?/); ``` -Your `average` function should use an implicit return. +La funzione `average` dovrebbe utilizzare un return implicito. ```js assert.notMatch(code, /const\s+average\s*=\s*\(?\s*nums\s*\)?\s*=>\s*{/); ``` -Your `average` function should return the average value of the `nums` array. +La funzione `average` dovrebbe restituire il valore medio dell'array `nums`. ```js assert.equal(average([1,2,3]), 2); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643715013330824ecaa70442.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643715013330824ecaa70442.md index d72ed169821..b452e711c0e 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643715013330824ecaa70442.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643715013330824ecaa70442.md @@ -7,75 +7,75 @@ dashedName: step-22 # --description-- -Your next function will calculate the median value of an array of numbers. Start by declaring a `median` arrow function that takes a `nums` parameter. +La prossima funzione calcolerà il valore mediano di un array di numeri. Inizia dichiarando una funzione freccia `median` che prende un parametro `nums`. -In the function, declare a `sorted` variable and assign it the value of sorting a copy of the `nums` array. +Nella funzione, dichiara una variabile `sorted` e assegnale il valore dell'ordinamento di una copia dell'array `nums`. -You should use the `slice()` method for creating a shallow copy of the array. +Dovresti usare il metodo `slice()` per creare una copia superficiale dell'array. # --hints-- -You should declare a `median` variable. +Dovresti dichiarare una variabile `median`. ```js assert.match(code, /(?:let|const|var)\s+median/); ``` -You should use `const` to declare your `median` variable. +Dovresti usare `const` per dichiarare la variabile `median`. ```js assert.match(code, /const\s+median/); ``` -Your `median` variable should be a function. +La variabile `median` dovrebbe essere una funzione. ```js assert.isFunction(median); ``` -Your `median` function should use arrow syntax. +La funzione `median` dovrebbe utilizzare la sintassi freccia. ```js assert.match(code, /const\s+median\s*=\s*\(?/); ``` -Your `median` function should have a `nums` parameter. +La funzione `median` dovrebbe avere un parametro `nums`. ```js assert.match(code, /const\s+median\s*=\s*\(?\s*nums\s*\)?/); ``` -Your `median` function should not use an implicit return. +La funzione `median` non dovrebbe utilizzare un return implicito. ```js assert.match(code, /const\s+median\s*=\s*\(?\s*nums\s*\)?\s*=>\s*\{/); ``` -Your `median` function should have a `sorted` variable. +La funzione `median` dovrebbe avere una variabile `sorted`. ```js assert.match(code, /const\s+median\s*=\s*\(?\s*nums\s*\)?\s*=>\s*\{\s*(?:let|var|const)\s+sorted/); ``` -You should use `const` to declare your `sorted` variable. +Dovresti usare `const` per dichiarare la variabile `sorted`. ```js assert.match(code, /const\s+median\s*=\s*\(?\s*nums\s*\)?\s*=>\s*\{\s*const\s+sorted/); ``` -You should use `.slice()` to assign a copy of the `nums` array to `sorted`. +Dovresti usare `.slice()` per assegnare una copia dell'array `nums` a `sorted`. ```js assert.match(code, /const\s+median\s*=\s*\(?\s*nums\s*\)?\s*=>\s*\{\s*const\s+sorted\s*=\s*nums\.slice\(\s*\)/); ``` -You should chain the `.sort()` method to your `.slice()` method. +Dovresti concatenare il metodo `.sort()` al metodo `.slice()`. ```js assert.match(code, /const\s+median\s*=\s*\(?\s*nums\s*\)?\s*=>\s*\{\s*const\s+sorted\s*=\s*nums\.slice\(\s*\)\.sort\(/); ``` -You should pass a callback function to your `sort` method to accurately sort the numbers in ascending order. Use an implicit return for clarity. +Dovresti passare una funzione callback al metodo `sort` per ordinare accuratamente i numeri in ordine crescente. Usa un return implicito per chiarezza. ```js assert.match(code, /const\s+median\s*=\s*\(?\s*nums\s*\)?\s*=>\s*\{\s*const\s+sorted\s*=\s*nums\.slice\(\s*\)\.sort\(\s*\(\s*a\s*,\s*b\s*\)\s*=>\s*a\s*-\s*b\s*\)\s*\s*;?\s*\}/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64496d1e5af8c0148fbef96d.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64496d1e5af8c0148fbef96d.md index d9107f59a66..1d11d742d8d 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64496d1e5af8c0148fbef96d.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64496d1e5af8c0148fbef96d.md @@ -7,47 +7,47 @@ dashedName: step-23 # --description-- -Now declare a `length` variable and assign it the length of your sorted array, and a `middle` variable that has the value of the length divided by `2`, subtracted by `1`. +Ora dichiara una variabile `length` e assegnale la lunghezza dell'array ordinato, e una variabile `middle` che ha il valore della lunghezza diviso `2`, meno `1`. # --hints-- -You should declare a `length` variable after your `sorted` variable. +Dovresti dichiarare una variabile `length` dopo la variabile `sorted`. ```js assert.match(code, /const\s+median\s*=\s*nums\s*=>\s*\{\s*const\s+sorted\s*=\s*nums\.slice\(\s*\)\.sort\(\s*\(\s*a\s*,\s*b\s*\)\s*=>\s*a\s*-\s*b\s*\)\s*\s*;?\s*(?:var|let|const)\s+length/); ``` -You should use `const` to declare your `length` variable. +Dovresti usare `const` per dichiarare la variabile `length`. ```js assert.match(code, /const\s+median\s*=\s*nums\s*=>\s*\{\s*const\s+sorted\s*=\s*nums\.slice\(\s*\)\.sort\(\s*\(\s*a\s*,\s*b\s*\)\s*=>\s*a\s*-\s*b\s*\)\s*\s*;?\s*const\s+length/); ``` -You should assign the length of the `sorted` array to your `length` variable. +Dovresti assegnare la lunghezza dell'array `sorted` alla variabile `length`. ```js assert.match(code, /const\s+median\s*=\s*nums\s*=>\s*\{\s*const\s+sorted\s*=\s*nums\.slice\(\s*\)\.sort\(\s*\(\s*a\s*,\s*b\s*\)\s*=>\s*a\s*-\s*b\s*\)\s*\s*;?\s*const\s+length\s*=\s*sorted\.length;?/); ``` -You should declare a `middle` variable after your `length` variable. +Dovresti dichiarare una variabile `middle` dopo la variabile `length`. ```js assert.match(code, /const\s+median\s*=\s*nums\s*=>\s*\{\s*const\s+sorted\s*=\s*nums\.slice\(\s*\)\.sort\(\s*\(\s*a\s*,\s*b\s*\)\s*=>\s*a\s*-\s*b\s*\)\s*\s*;?\s*const\s+length\s*=\s*sorted\.length;?\s*(?:var|let|const)\s+middle/); ``` -You should use `const` to declare your `middle` variable. +Dovresti usare `const` per dichiarare la variabile `middle`. ```js assert.match(code, /const\s+median\s*=\s*nums\s*=>\s*\{\s*const\s+sorted\s*=\s*nums\.slice\(\s*\)\.sort\(\s*\(\s*a\s*,\s*b\s*\)\s*=>\s*a\s*-\s*b\s*\)\s*\s*;?\s*const\s+length\s*=\s*sorted\.length;?\s*const\s+middle/); ``` -You should assign `middle` the value of dividing your `length` variable by `2`. +Dovresti assegnare a `middle` il valore della divisione della variabile `length` per `2`. ```js assert.match(code, /const\s+median\s*=\s*nums\s*=>\s*\{\s*const\s+sorted\s*=\s*nums\.slice\(\s*\)\.sort\(\s*\(\s*a\s*,\s*b\s*\)\s*=>\s*a\s*-\s*b\s*\)\s*\s*;?\s*const\s+length\s*=\s*sorted\.length;?\s*const\s+middle\s*=\s*length\s*\/\s*2/); ``` -You should subtract `1` from your `length / 2` calculation. +Dovresti sottrarre `1` dal calcolo `length / 2`. ```js assert.match(code, /const\s+median\s*=\s*nums\s*=>\s*\{\s*const\s+sorted\s*=\s*nums\.slice\(\s*\)\.sort\(\s*\(\s*a\s*,\s*b\s*\)\s*=>\s*a\s*-\s*b\s*\)\s*\s*;?\s*const\s+length\s*=\s*sorted\.length;?\s*const\s+middle\s*=\s*length\s*\/\s*2\s*-\s*1/); diff --git a/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-a.md b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-a.md new file mode 100644 index 00000000000..81cc2d54518 --- /dev/null +++ b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-a.md @@ -0,0 +1,45 @@ +--- +id: 64a5529c02815a7d323aab88 +title: The Box Model Question A +challengeType: 15 +dashedName: the-box-model-question-a +--- + +# --description-- + +Being able to inspect and debug your HTML and CSS is critical to frontend development. This lesson will take us through the Chrome Dev Tools, which allow you to see detailed information about your elements and CSS rules, as well as assist you in finding and fixing problems in your code. + +To open up the inspector, you can right-click on any element of a webpage and click “Inspect” or press F12. Go ahead and do that right now to see the HTML and CSS used on this page. + +Don’t get overwhelmed with all the tools you’re now seeing! For this lesson, we want to focus on the Elements and Styles panes. + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +Which panes should you focus on in the Chrome Dev Tools for inspecting and debugging HTML and CSS? + +## --answers-- + +Console and Network + +--- + +Elements and Styles + +--- + +Sources and Application + +--- + +Performance and Memory + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-b.md b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-b.md new file mode 100644 index 00000000000..c830844ef5e --- /dev/null +++ b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-b.md @@ -0,0 +1,42 @@ +--- +id: 64a553ed02815a7d323aab89 +title: The Box Model Question B +challengeType: 15 +dashedName: the-box-model-question-b +--- + +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --text-- + +When inspecting an element in the Chrome Dev Tools, if a style property is shown with a strikethrough, what does it indicate? + +## --answers-- + +The style property is currently disabled and not applied to the element. + +--- + +The style property is overridden by a more specific CSS rule. + +--- + +The style property is deprecated and should not be used. + +--- + +The style property is experimental and may not be supported by all browsers + +## --video-solution-- + +2 diff --git a/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-c.md b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-c.md new file mode 100644 index 00000000000..84cee19aea0 --- /dev/null +++ b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-c.md @@ -0,0 +1,46 @@ +--- +id: 64a5551d02815a7d323aab8a +title: The Box Model Question C +challengeType: 15 +dashedName: the-box-model-question-c +--- +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +Which feature in the Elements pane allows you to select any element on a webpage by hovering over it? + +## --answers-- + +Blue-highlighted icon + +--- + +Styles tab + +--- + +Inspector tab + +--- + +HTML structure view + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-d.md b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-d.md new file mode 100644 index 00000000000..4d882631471 --- /dev/null +++ b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-d.md @@ -0,0 +1,47 @@ +--- +id: 64a55a6102815a7d323aab8b +title: The Box Model Question D +challengeType: 15 +dashedName: the-box-model-question-d +--- +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +In the Styles pane, what information can you view about an element when it is selected? + +## --answers-- + +HTML structure and CSS rules + +--- + +Styles tab + +--- + +Inspector tab + +--- + +Applied styles and overwritten styles. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-e.md b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-e.md new file mode 100644 index 00000000000..7db2559056a --- /dev/null +++ b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-e.md @@ -0,0 +1,38 @@ +--- +id: 64a669f77a7d00f97013ed0c +title: The Box Model Question E +challengeType: 15 +dashedName: the-box-model-question-e +--- +# --description-- + +Now that you understand the basic syntax of HTML and CSS, we’re going to get serious. The most important skills you need to master with CSS are positioning and layout. Changing fonts and colors is a crucial skill, but being able to put things exactly where you want them on a webpage is even more crucial. After all, how many webpages can you find where absolutely every element is just stacked one on top of another? + +Learning to position elements on a webpage is not that difficult once you understand just a few key concepts. Unfortunately, many learners race through learning HTML and CSS to get to JavaScript and end up missing these fundamental concepts. This leads to frustration, pain, (and funny gifs) because all the JavaScript skills in the world are meaningless if you can’t stick your elements on the page where you need them to be. So with that in mind, let’s get started. + +# --question-- + +## --text-- + +Why is it important to have a solid understanding of CSS in web development? + +## --answers-- + +It allows you to create complex animations and interactive effects. + +--- + +It allows you to create complex animations and interactive effects. + +--- + +It helps in optimizing database queries for improved performance. + +--- + +It enables you to style and design webpages with precision and control. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-f.md b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-f.md new file mode 100644 index 00000000000..a91d049aee3 --- /dev/null +++ b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-f.md @@ -0,0 +1,49 @@ +--- +id: 64a66c917a7d00f97013ed0d +title: The Box Model Question F +challengeType: 15 +dashedName: the-box-model-question-f +--- +# --description-- + +The first important concept that you need to understand to be successful in CSS is the box model. It isn’t complicated, but skipping over it now will cause you much frustration down the line. + +Every single thing on a webpage is a rectangular box. These boxes can have other boxes in them and can sit alongside one another. You can get a rough idea of how this works by sticking a border on every item on the page like this: + +```css +* { + border: 1px solid red; +} +``` + + +# --question-- + +## --assignment-- + +Add a border to every element on the page and see how the boxes are laid out. + +## --text-- + +What is the fundamental concept in CSS that helps you understand the structure of elements as rectangular boxes? + +## --answers-- + +Box-sizing + +--- + +Box-shadow + +--- + +Box model + +--- + +Border-box + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-g.md b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-g.md new file mode 100644 index 00000000000..b8c981a7aa9 --- /dev/null +++ b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-g.md @@ -0,0 +1,52 @@ +--- +id: 64a6702e7a7d00f97013ed0e +title: The Box Model Question G +challengeType: 15 +dashedName: the-box-model-question-g +--- +# --description-- + +![lines](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/odin-lined.png) + +OK, so there might be some circles in the above image… but when it comes to layout, they fit together like rectangular boxes and not circles. In the end, laying out a webpage and positioning all its elements is deciding how you are going to nest and stack these boxes. + +The only real complication here is that there are many ways to manipulate the size of these boxes, and the space between them, using padding, margin, and border. But to sum it up briefly: + +- `padding` increases the space between the border of a box and the content of the box. +- `margin` increases the space between the borders of a box and the borders of adjacent boxes. +- `border` adds space (even if it’s only a pixel or two) between the margin and the padding. + +Be sure to study the diagrams carefully. + +![the box model](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/box-model.png) + +# --question-- + +## --assignment-- + +Add a border to every element on the page and see how the boxes are laid out. + +## --text-- + +From inside to outside, what is the order of box-model properties? + +## --answers-- + +Content, Margin, Padding, Border + +--- + +Margin, Padding, Content, Border + +--- + +Content, Padding, Border, Margin + +--- + +Padding, Content, Border, Margin + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-h.md b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-h.md new file mode 100644 index 00000000000..3c711550b34 --- /dev/null +++ b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-h.md @@ -0,0 +1,37 @@ +--- +id: 64a674937a7d00f97013ed0f +videoId: rIO5326FgPE +title: The Box Model Question H +challengeType: 15 +dashedName: the-box-model-question-h +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +What does the box-sizing CSS property do? + +## --answers-- + +It determines the order of the box-model properties. + +--- + +It specifies the position of an element on the webpage. + +--- + +It controls how the total width and height of an element are calculated. + +--- + +It sets the background color of an element. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-i.md b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-i.md new file mode 100644 index 00000000000..026ca2c2034 --- /dev/null +++ b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-i.md @@ -0,0 +1,36 @@ +--- +id: 64a6749a7a7d00f97013ed10 +videoId: rIO5326FgPE +title: The Box Model Question I +challengeType: 15 +dashedName: the-box-model-question-i +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +What is the difference between the standard and alternative box model? + +## --answers-- + +The standard box model calculates the width and height of an element based on the content alone, while the alternative box model calculates based on the content plus padding and border. + +--- + +The standard box model includes content, padding, and border, while the alternative box model includes only the content. + +--- + +The standard box model and the alternative box model are the same and have no differences. + +--- + +The standard box model includes only the content, while the alternative box model includes content, padding, and border. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-j.md b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-j.md new file mode 100644 index 00000000000..990fedec175 --- /dev/null +++ b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-j.md @@ -0,0 +1,37 @@ +--- +id: 64a674a47a7d00f97013ed11 +videoId: rIO5326FgPE +title: The Box Model Question J +challengeType: 15 +dashedName: the-box-model-question-j +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Would you use margin or padding to create more space between 2 elements? + +## --answers-- + +Padding + +--- + +Both margin and padding can be used interchangeably + +--- + +Neither margin nor padding can be used to create more space between elements + +--- + +Margin + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-k.md b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-k.md new file mode 100644 index 00000000000..933a01523c2 --- /dev/null +++ b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-k.md @@ -0,0 +1,36 @@ +--- +id: 64a674ac7a7d00f97013ed12 +videoId: rIO5326FgPE +title: The Box Model Question K +challengeType: 15 +dashedName: the-box-model-question-k +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Which CSS property would you use to create more space between the contents of an element and its border? + +## --answers-- + +Margin + +--- + +Padding + +--- + +Border + +--- + +Float + +## --video-solution-- + +2 diff --git a/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-l.md b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-l.md new file mode 100644 index 00000000000..80dfdc527af --- /dev/null +++ b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-l.md @@ -0,0 +1,28 @@ +--- +id: 64a674b97a7d00f97013ed13 +videoId: rIO5326FgPE +title: The Box Model Question L +challengeType: 15 +dashedName: the-box-model-question-l +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Would you use margin or padding if you wanted two elements to overlap each other? + +## --answers-- + +Padding + +--- + +Margin + +## --video-solution-- + +2 diff --git a/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-m.md b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-m.md new file mode 100644 index 00000000000..c55213cfd1b --- /dev/null +++ b/curriculum/challenges/italian/16-the-odin-project/top-the-box-model/the-box-model-question-m.md @@ -0,0 +1,67 @@ +--- +id: 64a674c27a7d00f97013ed14 +videoId: rIO5326FgPE +title: The Box Model Question M +challengeType: 15 +dashedName: the-box-model-question-m +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +How do you set the alternative box model for all of your elements? + +## --answers-- + +```css +html { + box-sizing: inherit; +} +*, +*::before, +*::after { + box-sizing: border-box; +} +``` + +--- + +```css +* { + box-sizing: border-box; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +* { + box-sizing: inherit; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +*, +*::before, +*::after { + box-sizing: inherit; +} +``` + + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md index 98fc0b2f097..912a3027bc9 100644 --- a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md +++ b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md @@ -62,5 +62,70 @@ doubleBasePalindromes(1000000); # --solutions-- ```js -// solution required +function buildPalindromesBase10(len) { + // Base cases + const palindromes = []; + if (len > 0) { + palindromes.push([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]); + } + if (len > 1) { + palindromes.push([11, 22, 33, 44, 55, 66, 77, 88, 99, 0]); + } + + for (let i = 3; i <= len; i++) { + const lengthIPalindromes = []; + + for (let j = 1; j < 10; j++) { + const firstDigit = j * (10 ** (i - 1)); + const lastDigit = j; + // Build off of palindromes 2 digits shorter + { + const shorterPalindromes = palindromes[i - 3]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 10 + lastDigit); + } + } + // Build off of palindromes 4 digits shorter + if (i > 4) { + const shorterPalindromes = palindromes[i - 5]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 100 + lastDigit); + } + } + } + palindromes.push(lengthIPalindromes); + } + return palindromes.flat(); +} + +function isPalindrome(num) { + const numAsString = num.toString(); + const numDigits = numAsString.length; + for (let i = 0; i < numDigits / 2; i++) { + if (numAsString[i] !== numAsString[numDigits - 1 - i]) { + return false; + } + } + return true; +} + +function isPalindromeBase2(num) { + return isPalindrome(num.toString(2)); +} + +function doubleBasePalindromes(n) { + let palindromeSum = 0; + const maxDigits = Math.ceil(Math.log10(n)); + const palindromesBase10 = buildPalindromesBase10(maxDigits); + + // Loop over all palindromes less than n + for (let i = 0; i < palindromesBase10.length && palindromesBase10[i] < n; i++) { + if (isPalindromeBase2(palindromesBase10[i])) { + palindromeSum += palindromesBase10[i]; + } + } + return palindromeSum; +} ``` diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md index 73e39e826b7..5a27ae583f3 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md @@ -39,23 +39,16 @@ assert(code.match(/\.slice/g)); assert(!code.match(/\.?[\s\S]*?splice/g)); ``` -`inputCities` 配列は変更しないでください。 +You should not mutate the original array passed to the function. ```js -assert( - JSON.stringify(inputCities) === - JSON.stringify(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) -); +assert.deepEqual(_inputCities, ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]); ``` `nonMutatingSplice(["Chicago", "Delhi", "Islamabad", "London", "Berlin"])` は `["Chicago", "Delhi", "Islamabad"]` を返す必要があります。 ```js -assert( - JSON.stringify( - nonMutatingSplice(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) - ) === JSON.stringify(['Chicago', 'Delhi', 'Islamabad']) -); +assert.deepEqual(nonMutatingSplice(_inputCities), ["Chicago", "Delhi", "Islamabad"]); ``` # --seed-- @@ -64,14 +57,15 @@ assert( ```js function nonMutatingSplice(cities) { - // Only change code below this line + return cities.splice(3); - - // Only change code above this line } +``` -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; -nonMutatingSplice(inputCities); +## --after-user-code-- + +```js +const _inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` # --solutions-- @@ -80,5 +74,4 @@ nonMutatingSplice(inputCities); function nonMutatingSplice(cities) { return cities.slice(0,3); } -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` diff --git a/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-a.md b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-a.md new file mode 100644 index 00000000000..81cc2d54518 --- /dev/null +++ b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-a.md @@ -0,0 +1,45 @@ +--- +id: 64a5529c02815a7d323aab88 +title: The Box Model Question A +challengeType: 15 +dashedName: the-box-model-question-a +--- + +# --description-- + +Being able to inspect and debug your HTML and CSS is critical to frontend development. This lesson will take us through the Chrome Dev Tools, which allow you to see detailed information about your elements and CSS rules, as well as assist you in finding and fixing problems in your code. + +To open up the inspector, you can right-click on any element of a webpage and click “Inspect” or press F12. Go ahead and do that right now to see the HTML and CSS used on this page. + +Don’t get overwhelmed with all the tools you’re now seeing! For this lesson, we want to focus on the Elements and Styles panes. + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +Which panes should you focus on in the Chrome Dev Tools for inspecting and debugging HTML and CSS? + +## --answers-- + +Console and Network + +--- + +Elements and Styles + +--- + +Sources and Application + +--- + +Performance and Memory + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-b.md b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-b.md new file mode 100644 index 00000000000..c830844ef5e --- /dev/null +++ b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-b.md @@ -0,0 +1,42 @@ +--- +id: 64a553ed02815a7d323aab89 +title: The Box Model Question B +challengeType: 15 +dashedName: the-box-model-question-b +--- + +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --text-- + +When inspecting an element in the Chrome Dev Tools, if a style property is shown with a strikethrough, what does it indicate? + +## --answers-- + +The style property is currently disabled and not applied to the element. + +--- + +The style property is overridden by a more specific CSS rule. + +--- + +The style property is deprecated and should not be used. + +--- + +The style property is experimental and may not be supported by all browsers + +## --video-solution-- + +2 diff --git a/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-c.md b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-c.md new file mode 100644 index 00000000000..84cee19aea0 --- /dev/null +++ b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-c.md @@ -0,0 +1,46 @@ +--- +id: 64a5551d02815a7d323aab8a +title: The Box Model Question C +challengeType: 15 +dashedName: the-box-model-question-c +--- +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +Which feature in the Elements pane allows you to select any element on a webpage by hovering over it? + +## --answers-- + +Blue-highlighted icon + +--- + +Styles tab + +--- + +Inspector tab + +--- + +HTML structure view + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-d.md b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-d.md new file mode 100644 index 00000000000..4d882631471 --- /dev/null +++ b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-d.md @@ -0,0 +1,47 @@ +--- +id: 64a55a6102815a7d323aab8b +title: The Box Model Question D +challengeType: 15 +dashedName: the-box-model-question-d +--- +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +In the Styles pane, what information can you view about an element when it is selected? + +## --answers-- + +HTML structure and CSS rules + +--- + +Styles tab + +--- + +Inspector tab + +--- + +Applied styles and overwritten styles. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-e.md b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-e.md new file mode 100644 index 00000000000..7db2559056a --- /dev/null +++ b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-e.md @@ -0,0 +1,38 @@ +--- +id: 64a669f77a7d00f97013ed0c +title: The Box Model Question E +challengeType: 15 +dashedName: the-box-model-question-e +--- +# --description-- + +Now that you understand the basic syntax of HTML and CSS, we’re going to get serious. The most important skills you need to master with CSS are positioning and layout. Changing fonts and colors is a crucial skill, but being able to put things exactly where you want them on a webpage is even more crucial. After all, how many webpages can you find where absolutely every element is just stacked one on top of another? + +Learning to position elements on a webpage is not that difficult once you understand just a few key concepts. Unfortunately, many learners race through learning HTML and CSS to get to JavaScript and end up missing these fundamental concepts. This leads to frustration, pain, (and funny gifs) because all the JavaScript skills in the world are meaningless if you can’t stick your elements on the page where you need them to be. So with that in mind, let’s get started. + +# --question-- + +## --text-- + +Why is it important to have a solid understanding of CSS in web development? + +## --answers-- + +It allows you to create complex animations and interactive effects. + +--- + +It allows you to create complex animations and interactive effects. + +--- + +It helps in optimizing database queries for improved performance. + +--- + +It enables you to style and design webpages with precision and control. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-f.md b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-f.md new file mode 100644 index 00000000000..a91d049aee3 --- /dev/null +++ b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-f.md @@ -0,0 +1,49 @@ +--- +id: 64a66c917a7d00f97013ed0d +title: The Box Model Question F +challengeType: 15 +dashedName: the-box-model-question-f +--- +# --description-- + +The first important concept that you need to understand to be successful in CSS is the box model. It isn’t complicated, but skipping over it now will cause you much frustration down the line. + +Every single thing on a webpage is a rectangular box. These boxes can have other boxes in them and can sit alongside one another. You can get a rough idea of how this works by sticking a border on every item on the page like this: + +```css +* { + border: 1px solid red; +} +``` + + +# --question-- + +## --assignment-- + +Add a border to every element on the page and see how the boxes are laid out. + +## --text-- + +What is the fundamental concept in CSS that helps you understand the structure of elements as rectangular boxes? + +## --answers-- + +Box-sizing + +--- + +Box-shadow + +--- + +Box model + +--- + +Border-box + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-g.md b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-g.md new file mode 100644 index 00000000000..b8c981a7aa9 --- /dev/null +++ b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-g.md @@ -0,0 +1,52 @@ +--- +id: 64a6702e7a7d00f97013ed0e +title: The Box Model Question G +challengeType: 15 +dashedName: the-box-model-question-g +--- +# --description-- + +![lines](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/odin-lined.png) + +OK, so there might be some circles in the above image… but when it comes to layout, they fit together like rectangular boxes and not circles. In the end, laying out a webpage and positioning all its elements is deciding how you are going to nest and stack these boxes. + +The only real complication here is that there are many ways to manipulate the size of these boxes, and the space between them, using padding, margin, and border. But to sum it up briefly: + +- `padding` increases the space between the border of a box and the content of the box. +- `margin` increases the space between the borders of a box and the borders of adjacent boxes. +- `border` adds space (even if it’s only a pixel or two) between the margin and the padding. + +Be sure to study the diagrams carefully. + +![the box model](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/box-model.png) + +# --question-- + +## --assignment-- + +Add a border to every element on the page and see how the boxes are laid out. + +## --text-- + +From inside to outside, what is the order of box-model properties? + +## --answers-- + +Content, Margin, Padding, Border + +--- + +Margin, Padding, Content, Border + +--- + +Content, Padding, Border, Margin + +--- + +Padding, Content, Border, Margin + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-h.md b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-h.md new file mode 100644 index 00000000000..3c711550b34 --- /dev/null +++ b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-h.md @@ -0,0 +1,37 @@ +--- +id: 64a674937a7d00f97013ed0f +videoId: rIO5326FgPE +title: The Box Model Question H +challengeType: 15 +dashedName: the-box-model-question-h +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +What does the box-sizing CSS property do? + +## --answers-- + +It determines the order of the box-model properties. + +--- + +It specifies the position of an element on the webpage. + +--- + +It controls how the total width and height of an element are calculated. + +--- + +It sets the background color of an element. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-i.md b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-i.md new file mode 100644 index 00000000000..026ca2c2034 --- /dev/null +++ b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-i.md @@ -0,0 +1,36 @@ +--- +id: 64a6749a7a7d00f97013ed10 +videoId: rIO5326FgPE +title: The Box Model Question I +challengeType: 15 +dashedName: the-box-model-question-i +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +What is the difference between the standard and alternative box model? + +## --answers-- + +The standard box model calculates the width and height of an element based on the content alone, while the alternative box model calculates based on the content plus padding and border. + +--- + +The standard box model includes content, padding, and border, while the alternative box model includes only the content. + +--- + +The standard box model and the alternative box model are the same and have no differences. + +--- + +The standard box model includes only the content, while the alternative box model includes content, padding, and border. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-j.md b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-j.md new file mode 100644 index 00000000000..990fedec175 --- /dev/null +++ b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-j.md @@ -0,0 +1,37 @@ +--- +id: 64a674a47a7d00f97013ed11 +videoId: rIO5326FgPE +title: The Box Model Question J +challengeType: 15 +dashedName: the-box-model-question-j +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Would you use margin or padding to create more space between 2 elements? + +## --answers-- + +Padding + +--- + +Both margin and padding can be used interchangeably + +--- + +Neither margin nor padding can be used to create more space between elements + +--- + +Margin + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-k.md b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-k.md new file mode 100644 index 00000000000..933a01523c2 --- /dev/null +++ b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-k.md @@ -0,0 +1,36 @@ +--- +id: 64a674ac7a7d00f97013ed12 +videoId: rIO5326FgPE +title: The Box Model Question K +challengeType: 15 +dashedName: the-box-model-question-k +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Which CSS property would you use to create more space between the contents of an element and its border? + +## --answers-- + +Margin + +--- + +Padding + +--- + +Border + +--- + +Float + +## --video-solution-- + +2 diff --git a/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-l.md b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-l.md new file mode 100644 index 00000000000..80dfdc527af --- /dev/null +++ b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-l.md @@ -0,0 +1,28 @@ +--- +id: 64a674b97a7d00f97013ed13 +videoId: rIO5326FgPE +title: The Box Model Question L +challengeType: 15 +dashedName: the-box-model-question-l +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Would you use margin or padding if you wanted two elements to overlap each other? + +## --answers-- + +Padding + +--- + +Margin + +## --video-solution-- + +2 diff --git a/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-m.md b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-m.md new file mode 100644 index 00000000000..c55213cfd1b --- /dev/null +++ b/curriculum/challenges/japanese/16-the-odin-project/top-the-box-model/the-box-model-question-m.md @@ -0,0 +1,67 @@ +--- +id: 64a674c27a7d00f97013ed14 +videoId: rIO5326FgPE +title: The Box Model Question M +challengeType: 15 +dashedName: the-box-model-question-m +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +How do you set the alternative box model for all of your elements? + +## --answers-- + +```css +html { + box-sizing: inherit; +} +*, +*::before, +*::after { + box-sizing: border-box; +} +``` + +--- + +```css +* { + box-sizing: border-box; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +* { + box-sizing: inherit; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +*, +*::before, +*::after { + box-sizing: inherit; +} +``` + + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/japanese/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md b/curriculum/challenges/japanese/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md index 9793d760c20..93e60e4d425 100644 --- a/curriculum/challenges/japanese/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md +++ b/curriculum/challenges/japanese/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md @@ -62,5 +62,70 @@ doubleBasePalindromes(1000000); # --solutions-- ```js -// solution required +function buildPalindromesBase10(len) { + // Base cases + const palindromes = []; + if (len > 0) { + palindromes.push([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]); + } + if (len > 1) { + palindromes.push([11, 22, 33, 44, 55, 66, 77, 88, 99, 0]); + } + + for (let i = 3; i <= len; i++) { + const lengthIPalindromes = []; + + for (let j = 1; j < 10; j++) { + const firstDigit = j * (10 ** (i - 1)); + const lastDigit = j; + // Build off of palindromes 2 digits shorter + { + const shorterPalindromes = palindromes[i - 3]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 10 + lastDigit); + } + } + // Build off of palindromes 4 digits shorter + if (i > 4) { + const shorterPalindromes = palindromes[i - 5]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 100 + lastDigit); + } + } + } + palindromes.push(lengthIPalindromes); + } + return palindromes.flat(); +} + +function isPalindrome(num) { + const numAsString = num.toString(); + const numDigits = numAsString.length; + for (let i = 0; i < numDigits / 2; i++) { + if (numAsString[i] !== numAsString[numDigits - 1 - i]) { + return false; + } + } + return true; +} + +function isPalindromeBase2(num) { + return isPalindrome(num.toString(2)); +} + +function doubleBasePalindromes(n) { + let palindromeSum = 0; + const maxDigits = Math.ceil(Math.log10(n)); + const palindromesBase10 = buildPalindromesBase10(maxDigits); + + // Loop over all palindromes less than n + for (let i = 0; i < palindromesBase10.length && palindromesBase10[i] < n; i++) { + if (isPalindromeBase2(palindromesBase10[i])) { + palindromeSum += palindromesBase10[i]; + } + } + return palindromeSum; +} ``` diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md index 54d0a2f3e49..e69053a8cbb 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md @@ -39,23 +39,16 @@ Você não deve usar o método `splice`. assert(!code.match(/\.?[\s\S]*?splice/g)); ``` -O array `inputCities` não deve ser alterado. +Você não deve modificar o array original passado à função. ```js -assert( - JSON.stringify(inputCities) === - JSON.stringify(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) -); +assert.deepEqual(_inputCities, ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]); ``` `nonMutatingSplice(["Chicago", "Delhi", "Islamabad", "London", "Berlin"])` deve retornar `["Chicago", "Delhi", "Islamabad"]`. ```js -assert( - JSON.stringify( - nonMutatingSplice(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) - ) === JSON.stringify(['Chicago', 'Delhi', 'Islamabad']) -); +assert.deepEqual(nonMutatingSplice(_inputCities), ["Chicago", "Delhi", "Islamabad"]); ``` # --seed-- @@ -64,14 +57,15 @@ assert( ```js function nonMutatingSplice(cities) { - // Only change code below this line + return cities.splice(3); - - // Only change code above this line } +``` -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; -nonMutatingSplice(inputCities); +## --after-user-code-- + +```js +const _inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` # --solutions-- @@ -80,5 +74,4 @@ nonMutatingSplice(inputCities); function nonMutatingSplice(cities) { return cities.slice(0,3); } -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` diff --git a/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-a.md b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-a.md new file mode 100644 index 00000000000..2c8f6b2c768 --- /dev/null +++ b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-a.md @@ -0,0 +1,45 @@ +--- +id: 64a5529c02815a7d323aab88 +title: Questão A sobre o modelo de caixas +challengeType: 15 +dashedName: the-box-model-question-a +--- + +# --description-- + +Poder inspecionar e depurar seu HTML e CSS é fundamental para o desenvolvimento do front-end. Esta lição nos mostrará as ferramentas de desenvolvimento do Chrome, que permitem que você veja informações detalhadas sobre seus elementos e regras do CSS. Elas também o ajudarão a encontrar e corrigir problemas no código. + +Para abrir o inspetor, você pode clicar com o botão direito em qualquer elemento de uma página e clicar em "Inspecionar" ou pressionar F12. Faça isso agora para ver o HTML e o CSS usados nesta página. + +Não se assuste com todas as ferramentas que você verá agora! Para esta lição, nos concentraremos nos painéis Elementos e Estilos. + +# --question-- + +## --assignment-- + +Divirta-se um pouco com as ferramentas de desenvolvimento do Chrome e veja se consegue responder à seguinte pergunta. + +## --text-- + +Em quais painéis você deve se concentrar nas ferramentas de desenvolvimento do Chrome para inspecionar e depurar o HTML e o CSS? + +## --answers-- + +Console e Rede + +--- + +Elementos e Estilos + +--- + +Fontes e Aplicação + +--- + +Desempenho e Memória + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-b.md b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-b.md new file mode 100644 index 00000000000..3c42ed1997a --- /dev/null +++ b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-b.md @@ -0,0 +1,42 @@ +--- +id: 64a553ed02815a7d323aab89 +title: Questão B sobre o modelo de caixas +challengeType: 15 +dashedName: the-box-model-question-b +--- + +# --description-- + +No painel Elementos, é possível ver toda a estrutura do HTML da página. Você pode clicar em qualquer um dos elementos nesse painel para selecionar o elemento específico. Como alternativa, você pode clicar no ícone realçado em azul mostrado abaixo e à esquerda, passando o mouse sobre qualquer elemento da página. + +![Ícone do Inspetor](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +Quando um elemento é selecionado, a guia Estilos mostrará todos os estilos atualmente aplicados, assim como quaisquer estilos que estão sendo substituídos (indicado por um texto com um risco no meio). Por exemplo, se você usar o inspetor para clicar no cabeçalho "Your Career in Development Starts Here" [na página principal](https://www.theodinproject.com/), no lado direito, você verá todos os estilos que atualmente estão afetando o elemento, como vemos abaixo: + +![Estilo sobrescrito](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --text-- + +Ao inspecionar um elemento nas ferramentas de desenvolvimento do Chrome, se uma propriedade de estilo é mostrada com um risco no meio, o que isso indica? + +## --answers-- + +A propriedade de estilo está atualmente desativada e não aplicada ao elemento. + +--- + +A propriedade de estilo foi sobrescrita por uma regra de CSS mais específica. + +--- + +A propriedade de estilo está obsoleta e não deve ser usada. + +--- + +A propriedade de estilo é experimental e pode não ser suportada por todos os navegadores. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-c.md b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-c.md new file mode 100644 index 00000000000..97a442b44ca --- /dev/null +++ b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-c.md @@ -0,0 +1,46 @@ +--- +id: 64a5551d02815a7d323aab8a +title: Questão C sobre o modelo de caixas +challengeType: 15 +dashedName: the-box-model-question-c +--- +# --description-- + +No painel Elementos, é possível ver toda a estrutura do HTML da página. Você pode clicar em qualquer um dos elementos nesse painel para selecionar o elemento específico. Como alternativa, você pode clicar no ícone realçado em azul mostrado abaixo e à esquerda, passando o mouse sobre qualquer elemento da página. + +![Ícone do Inspetor](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +Quando um elemento é selecionado, a guia Estilos mostrará todos os estilos atualmente aplicados, assim como quaisquer estilos que estão sendo substituídos (indicado por um texto com um risco no meio). Por exemplo, se você usar o inspetor para clicar no cabeçalho "Your Career in Development Starts Here" [na página principal](https://www.theodinproject.com/), no lado direito, você verá todos os estilos que atualmente estão afetando o elemento, como vemos abaixo: + +![Estilo sobrescrito](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --assignment-- + +Divirta-se um pouco com as ferramentas de desenvolvimento do Chrome e veja se consegue responder à seguinte pergunta. + +## --text-- + +Qual recurso no painel Elementos permite selecionar qualquer elemento em uma página da web, passando o mouse sobre ele? + +## --answers-- + +O ícone realçado em azul + +--- + +A guia Estilos + +--- + +A guia Inspetor + +--- + +A visualização de estrutura do HTML + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-d.md b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-d.md new file mode 100644 index 00000000000..4b051f21a91 --- /dev/null +++ b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-d.md @@ -0,0 +1,47 @@ +--- +id: 64a55a6102815a7d323aab8b +title: Questão D sobre o modelo de caixas +challengeType: 15 +dashedName: the-box-model-question-d +--- +# --description-- + +No painel Elementos, é possível ver toda a estrutura do HTML da página. Você pode clicar em qualquer um dos elementos nesse painel para selecionar o elemento específico. Como alternativa, você pode clicar no ícone realçado em azul mostrado abaixo e à esquerda, passando o mouse sobre qualquer elemento da página. + +![Ícone do Inspetor](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +Quando um elemento é selecionado, a guia Estilos mostrará todos os estilos atualmente aplicados, assim como quaisquer estilos que estão sendo substituídos (indicado por um texto com um risco no meio). Por exemplo, se você usar o inspetor para clicar no cabeçalho "Your Career in Development Starts Here" [na página principal](https://www.theodinproject.com/), no lado direito, você verá todos os estilos que atualmente estão afetando o elemento, como vemos abaixo: + +![Estilo sobrescrito](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + + +# --question-- + +## --assignment-- + +Divirta-se um pouco com as ferramentas de desenvolvimento do Chrome e veja se consegue responder à seguinte pergunta. + +## --text-- + +No painel Estilos, que informação você pode ver sobre um elemento quando ele é selecionado? + +## --answers-- + +A estrutura do HTML e as regras do CSS + +--- + +A guia Estilos + +--- + +A guia Inspetor + +--- + +Os estilos aplicados e os estilos sobrescritos. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-e.md b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-e.md new file mode 100644 index 00000000000..fc7215f93cc --- /dev/null +++ b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-e.md @@ -0,0 +1,38 @@ +--- +id: 64a669f77a7d00f97013ed0c +title: Questão E sobre o modelo de caixas +challengeType: 15 +dashedName: the-box-model-question-e +--- +# --description-- + +Agora que você entende a sintaxe básica do HTML e do CSS, vamos nos aprofundar um pouco mais. As habilidades mais importantes que você precisa dominar em CSS são o posicionamento e o layout. Alterar fontes e cores é uma habilidade crucial, mas ser capaz de colocar as coisas exatamente onde você as quer numa página da web é mais importante ainda. Afinal, quantas páginas podem ser encontradas onde os elementos estão simplesmente empilhados uns em cima dos outros? + +Aprender a posicionar elementos em uma página da web não é tão difícil quando você entende apenas alguns conceitos-chave. Infelizmente, muitos alunos passam rapidamente pelo aprendizado de HTML e CSS para chegar ao JavaScript e acabam perdendo esses conceitos fundamentais. Isso leva à frustração, dor e a alguns gifs engraçados, pois todas as habilidades em JavaScript no mundo perdem o sentido se você não puder encaixar seus elementos na página onde você precisa que eles estejam. Tendo isso em mente, vamos começar. + +# --question-- + +## --text-- + +Por que é importante ter uma compreensão satisfatória do CSS no desenvolvimento para a web? + +## --answers-- + +Ele permite que você crie animações complexas e efeitos interativos. + +--- + +Ele permite que você crie animações complexas e efeitos interativos. + +--- + +Ele ajuda a otimizar as consultas ao banco de dados para um melhor desempenho. + +--- + +Ele permite a você estilizar e projetar páginas da web com precisão e controle. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-f.md b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-f.md new file mode 100644 index 00000000000..a7386afc3d2 --- /dev/null +++ b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-f.md @@ -0,0 +1,49 @@ +--- +id: 64a66c917a7d00f97013ed0d +title: Questão F sobre o modelo de caixas +challengeType: 15 +dashedName: the-box-model-question-f +--- +# --description-- + +O primeiro conceito importante que você precisa entender para ter sucesso em CSS é o modelo de caixas. Não é complicado, mas ignorá-lo agora causará muita frustração mais tarde. + +Cada objeto em uma página é uma caixa retangular. Essas caixas podem ter outras caixas dentro elas e/ou ficar lado a lado. Você pode ter uma ideia aproximada de como isso funciona colocando uma borda em cada item da página, assim: + +```css +* { + border: 1px solid red; +} +``` + + +# --question-- + +## --assignment-- + +Adicione uma borda a cada elemento na página e veja como as caixas são traçadas. + +## --text-- + +Qual é o conceito fundamental em CSS que ajuda você a entender a estrutura de elementos como caixas retangulares? + +## --answers-- + +Tamanho das caixas + +--- + +Sombra das caixas + +--- + +Modelo de caixas + +--- + +Borda das caixas + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-g.md b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-g.md new file mode 100644 index 00000000000..9a6411f406b --- /dev/null +++ b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-g.md @@ -0,0 +1,52 @@ +--- +id: 64a6702e7a7d00f97013ed0e +title: Questão G sobre o modelo de caixas +challengeType: 15 +dashedName: the-box-model-question-g +--- +# --description-- + +![linhas](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/odin-lined.png) + +Certo... pode haver alguns círculos na imagem acima… mas, quando se trata de layout, eles se encaixam como caixas retangulares e não como círculos. No final, criar uma página da web e posicionar todos os elementos é decidir como você vai aninhar e empilhar essas caixas. + +A única complicação real aqui é que há muitas maneiras de manipular o tamanho dessas caixas, bem como o espaço entre elas. Para isso, usamos preenchimento (padding), margem (margin) e borda (border). Em resumo: + +- `padding` aumenta o espaço entre a borda de uma caixa e o conteúdo da caixa. +- `margin` aumenta o espaço entre as bordas de uma caixa e as bordas das caixas adjacentes. +- `border` adiciona espaço (mesmo que seja apenas um pixel ou dois) entre a margem e o preenchimento. + +Lembre-se de estudar os diagramas cuidadosamente. + +![o modelo de caixas](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/box-model.png) + +# --question-- + +## --assignment-- + +Adicione uma borda a cada elemento na página e veja como as caixas são traçadas. + +## --text-- + +De dentro para fora, qual é a ordem das propriedades do modelo de caixas? + +## --answers-- + +Conteúdo, margem, preenchimento, borda + +--- + +Margem, preenchimento, conteúdo, borda + +--- + +Conteúdo, preenchimento, borda, margem + +--- + +Preenchimento, conteúdo, borda, margem + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-h.md b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-h.md new file mode 100644 index 00000000000..1216518c76a --- /dev/null +++ b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-h.md @@ -0,0 +1,37 @@ +--- +id: 64a674937a7d00f97013ed0f +videoId: rIO5326FgPE +title: Questão H sobre o modelo de caixas +challengeType: 15 +dashedName: the-box-model-question-h +--- +# --description-- + +Pelo fato de o conceito do modelo de caixas ser incrivelmente fundamental, vamos nos aprofundar um pouco com [esta lição da MDN (em inglês)](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). Ela trata do mesmo material que o vídeo acima e apresentará as caixas em linha, das quais trataremos na próxima aula. Preste muita atenção nos exemplos e reserve um tempo para experimentar com o editor no navegador! + +# --question-- + +## --text-- + +O que faz a propriedade box-sizing do CSS? + +## --answers-- + +Determina a ordem das propriedades do modelo de caixas. + +--- + +Especifica a posição de um elemento na página da web. + +--- + +Controla como a largura e a altura total de um elemento são calculadas. + +--- + +Define a cor de fundo de um elemento. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-i.md b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-i.md new file mode 100644 index 00000000000..3792b657e94 --- /dev/null +++ b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-i.md @@ -0,0 +1,36 @@ +--- +id: 64a6749a7a7d00f97013ed10 +videoId: rIO5326FgPE +title: Questão I sobre o modelo de caixas +challengeType: 15 +dashedName: the-box-model-question-i +--- +# --description-- + +Pelo fato de o conceito do modelo de caixas ser incrivelmente fundamental, vamos nos aprofundar um pouco com [esta lição da MDN (em inglês)](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). Ela trata do mesmo material que o vídeo acima e apresentará as caixas em linha, das quais trataremos na próxima aula. Preste muita atenção nos exemplos e reserve um tempo para experimentar com o editor no navegador! + +# --question-- + +## --text-- + +Qual é a diferença entre o modelo de caixas padrão e o modelo alternativo? + +## --answers-- + +O modelo de caixas padrão calcula a largura e a altura de um elemento com base exclusivamente no conteúdo, enquanto o modelo alternativo de caixas calcula ambos com base no conteúdo mais preenchimento e borda. + +--- + +O modelo de caixas padrão inclui conteúdo, preenchimento e borda, enquanto o modelo de caixas alternativo inclui apenas o conteúdo. + +--- + +O modelo de caixas padrão e o modelo de caixas alternativo são a mesma coisa, não tendo diferenças. + +--- + +O modelo de caixas padrão inclui apenas o conteúdo, enquanto o modelo alternativo inclui conteúdo, preenchimento e borda. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-j.md b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-j.md new file mode 100644 index 00000000000..10075042ca8 --- /dev/null +++ b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-j.md @@ -0,0 +1,37 @@ +--- +id: 64a674a47a7d00f97013ed11 +videoId: rIO5326FgPE +title: Questão J sobre o modelo de caixas +challengeType: 15 +dashedName: the-box-model-question-j +--- +# --description-- + +Pelo fato de o conceito do modelo de caixas ser incrivelmente fundamental, vamos nos aprofundar um pouco com [esta lição da MDN (em inglês)](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). Ela trata do mesmo material que o vídeo acima e apresentará as caixas em linha, das quais trataremos na próxima aula. Preste muita atenção nos exemplos e reserve um tempo para experimentar com o editor no navegador! + +# --question-- + +## --text-- + +Você usaria margin ou padding para criar mais espaço entre dois elementos? + +## --answers-- + +Padding + +--- + +Margin e padding podem ser usados sem distinção + +--- + +Margin e padding não podem ser usados para criar mais espaço entre elementos + +--- + +Margin + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-k.md b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-k.md new file mode 100644 index 00000000000..b22cdb6034b --- /dev/null +++ b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-k.md @@ -0,0 +1,36 @@ +--- +id: 64a674ac7a7d00f97013ed12 +videoId: rIO5326FgPE +title: Questão K sobre o modelo de caixas +challengeType: 15 +dashedName: the-box-model-question-k +--- +# --description-- + +Pelo fato de o conceito do modelo de caixas ser incrivelmente fundamental, vamos nos aprofundar um pouco com [esta lição da MDN (em inglês)](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). Ela trata do mesmo material que o vídeo acima e apresentará as caixas em linha, das quais trataremos na próxima aula. Preste muita atenção nos exemplos e reserve um tempo para experimentar com o editor no navegador! + +# --question-- + +## --text-- + +Qual propriedade do CSS você usaria para criar mais espaço entre o conteúdo de um elemento e sua borda? + +## --answers-- + +Margin + +--- + +Padding + +--- + +Border + +--- + +Float + +## --video-solution-- + +2 diff --git a/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-l.md b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-l.md new file mode 100644 index 00000000000..30b083f27db --- /dev/null +++ b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-l.md @@ -0,0 +1,28 @@ +--- +id: 64a674b97a7d00f97013ed13 +videoId: rIO5326FgPE +title: Questão L sobre o modelo de caixas +challengeType: 15 +dashedName: the-box-model-question-l +--- +# --description-- + +Pelo fato de o conceito do modelo de caixas ser incrivelmente fundamental, vamos nos aprofundar um pouco com [esta lição da MDN (em inglês)](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). Ela trata do mesmo material que o vídeo acima e apresentará as caixas em linha, das quais trataremos na próxima aula. Preste muita atenção nos exemplos e reserve um tempo para experimentar com o editor no navegador! + +# --question-- + +## --text-- + +Você usaria margin ou padding se quisesse que dois elementos sobrepusessem um ao outro? + +## --answers-- + +Padding + +--- + +Margin + +## --video-solution-- + +2 diff --git a/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-m.md b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-m.md new file mode 100644 index 00000000000..d62e3768732 --- /dev/null +++ b/curriculum/challenges/portuguese/16-the-odin-project/top-the-box-model/the-box-model-question-m.md @@ -0,0 +1,67 @@ +--- +id: 64a674c27a7d00f97013ed14 +videoId: rIO5326FgPE +title: Questão M sobre o modelo de caixas +challengeType: 15 +dashedName: the-box-model-question-m +--- +# --description-- + +Pelo fato de o conceito do modelo de caixas ser incrivelmente fundamental, vamos nos aprofundar um pouco com [esta lição da MDN (em inglês)](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). Ela trata do mesmo material que o vídeo acima e apresentará as caixas em linha, das quais trataremos na próxima aula. Preste muita atenção nos exemplos e reserve um tempo para experimentar com o editor no navegador! + +# --question-- + +## --text-- + +Como você define o modelo de caixas alternativo para todos os elementos? + +## --answers-- + +```css +html { + box-sizing: inherit; +} +*, +*::before, +*::after { + box-sizing: border-box; +} +``` + +--- + +```css +* { + box-sizing: border-box; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +* { + box-sizing: inherit; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +*, +*::before, +*::after { + box-sizing: inherit; +} +``` + + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md index 05d029842f2..41b16ff84a2 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md @@ -62,5 +62,70 @@ doubleBasePalindromes(1000000); # --solutions-- ```js -// solution required +function buildPalindromesBase10(len) { + // Base cases + const palindromes = []; + if (len > 0) { + palindromes.push([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]); + } + if (len > 1) { + palindromes.push([11, 22, 33, 44, 55, 66, 77, 88, 99, 0]); + } + + for (let i = 3; i <= len; i++) { + const lengthIPalindromes = []; + + for (let j = 1; j < 10; j++) { + const firstDigit = j * (10 ** (i - 1)); + const lastDigit = j; + // Build off of palindromes 2 digits shorter + { + const shorterPalindromes = palindromes[i - 3]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 10 + lastDigit); + } + } + // Build off of palindromes 4 digits shorter + if (i > 4) { + const shorterPalindromes = palindromes[i - 5]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 100 + lastDigit); + } + } + } + palindromes.push(lengthIPalindromes); + } + return palindromes.flat(); +} + +function isPalindrome(num) { + const numAsString = num.toString(); + const numDigits = numAsString.length; + for (let i = 0; i < numDigits / 2; i++) { + if (numAsString[i] !== numAsString[numDigits - 1 - i]) { + return false; + } + } + return true; +} + +function isPalindromeBase2(num) { + return isPalindrome(num.toString(2)); +} + +function doubleBasePalindromes(n) { + let palindromeSum = 0; + const maxDigits = Math.ceil(Math.log10(n)); + const palindromesBase10 = buildPalindromesBase10(maxDigits); + + // Loop over all palindromes less than n + for (let i = 0; i < palindromesBase10.length && palindromesBase10[i] < n; i++) { + if (isPalindromeBase2(palindromesBase10[i])) { + palindromeSum += palindromesBase10[i]; + } + } + return palindromeSum; +} ``` diff --git a/curriculum/challenges/swahili/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md b/curriculum/challenges/swahili/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md index bad17790dfa..7b67c284b42 100644 --- a/curriculum/challenges/swahili/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md +++ b/curriculum/challenges/swahili/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md @@ -39,23 +39,16 @@ Your code should not use the `splice` method. assert(!code.match(/\.?[\s\S]*?splice/g)); ``` -The `inputCities` array should not change. +You should not mutate the original array passed to the function. ```js -assert( - JSON.stringify(inputCities) === - JSON.stringify(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) -); +assert.deepEqual(_inputCities, ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]); ``` `nonMutatingSplice(["Chicago", "Delhi", "Islamabad", "London", "Berlin"])` should return `["Chicago", "Delhi", "Islamabad"]`. ```js -assert( - JSON.stringify( - nonMutatingSplice(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) - ) === JSON.stringify(['Chicago', 'Delhi', 'Islamabad']) -); +assert.deepEqual(nonMutatingSplice(_inputCities), ["Chicago", "Delhi", "Islamabad"]); ``` # --seed-- @@ -64,14 +57,15 @@ assert( ```js function nonMutatingSplice(cities) { - // Only change code below this line + return cities.splice(3); - - // Only change code above this line } +``` -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; -nonMutatingSplice(inputCities); +## --after-user-code-- + +```js +const _inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` # --solutions-- @@ -80,5 +74,4 @@ nonMutatingSplice(inputCities); function nonMutatingSplice(cities) { return cities.slice(0,3); } -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` diff --git a/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-a.md b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-a.md new file mode 100644 index 00000000000..81cc2d54518 --- /dev/null +++ b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-a.md @@ -0,0 +1,45 @@ +--- +id: 64a5529c02815a7d323aab88 +title: The Box Model Question A +challengeType: 15 +dashedName: the-box-model-question-a +--- + +# --description-- + +Being able to inspect and debug your HTML and CSS is critical to frontend development. This lesson will take us through the Chrome Dev Tools, which allow you to see detailed information about your elements and CSS rules, as well as assist you in finding and fixing problems in your code. + +To open up the inspector, you can right-click on any element of a webpage and click “Inspect” or press F12. Go ahead and do that right now to see the HTML and CSS used on this page. + +Don’t get overwhelmed with all the tools you’re now seeing! For this lesson, we want to focus on the Elements and Styles panes. + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +Which panes should you focus on in the Chrome Dev Tools for inspecting and debugging HTML and CSS? + +## --answers-- + +Console and Network + +--- + +Elements and Styles + +--- + +Sources and Application + +--- + +Performance and Memory + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-b.md b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-b.md new file mode 100644 index 00000000000..c830844ef5e --- /dev/null +++ b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-b.md @@ -0,0 +1,42 @@ +--- +id: 64a553ed02815a7d323aab89 +title: The Box Model Question B +challengeType: 15 +dashedName: the-box-model-question-b +--- + +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --text-- + +When inspecting an element in the Chrome Dev Tools, if a style property is shown with a strikethrough, what does it indicate? + +## --answers-- + +The style property is currently disabled and not applied to the element. + +--- + +The style property is overridden by a more specific CSS rule. + +--- + +The style property is deprecated and should not be used. + +--- + +The style property is experimental and may not be supported by all browsers + +## --video-solution-- + +2 diff --git a/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-c.md b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-c.md new file mode 100644 index 00000000000..84cee19aea0 --- /dev/null +++ b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-c.md @@ -0,0 +1,46 @@ +--- +id: 64a5551d02815a7d323aab8a +title: The Box Model Question C +challengeType: 15 +dashedName: the-box-model-question-c +--- +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +Which feature in the Elements pane allows you to select any element on a webpage by hovering over it? + +## --answers-- + +Blue-highlighted icon + +--- + +Styles tab + +--- + +Inspector tab + +--- + +HTML structure view + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-d.md b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-d.md new file mode 100644 index 00000000000..4d882631471 --- /dev/null +++ b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-d.md @@ -0,0 +1,47 @@ +--- +id: 64a55a6102815a7d323aab8b +title: The Box Model Question D +challengeType: 15 +dashedName: the-box-model-question-d +--- +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +In the Styles pane, what information can you view about an element when it is selected? + +## --answers-- + +HTML structure and CSS rules + +--- + +Styles tab + +--- + +Inspector tab + +--- + +Applied styles and overwritten styles. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-e.md b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-e.md new file mode 100644 index 00000000000..7db2559056a --- /dev/null +++ b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-e.md @@ -0,0 +1,38 @@ +--- +id: 64a669f77a7d00f97013ed0c +title: The Box Model Question E +challengeType: 15 +dashedName: the-box-model-question-e +--- +# --description-- + +Now that you understand the basic syntax of HTML and CSS, we’re going to get serious. The most important skills you need to master with CSS are positioning and layout. Changing fonts and colors is a crucial skill, but being able to put things exactly where you want them on a webpage is even more crucial. After all, how many webpages can you find where absolutely every element is just stacked one on top of another? + +Learning to position elements on a webpage is not that difficult once you understand just a few key concepts. Unfortunately, many learners race through learning HTML and CSS to get to JavaScript and end up missing these fundamental concepts. This leads to frustration, pain, (and funny gifs) because all the JavaScript skills in the world are meaningless if you can’t stick your elements on the page where you need them to be. So with that in mind, let’s get started. + +# --question-- + +## --text-- + +Why is it important to have a solid understanding of CSS in web development? + +## --answers-- + +It allows you to create complex animations and interactive effects. + +--- + +It allows you to create complex animations and interactive effects. + +--- + +It helps in optimizing database queries for improved performance. + +--- + +It enables you to style and design webpages with precision and control. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-f.md b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-f.md new file mode 100644 index 00000000000..a91d049aee3 --- /dev/null +++ b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-f.md @@ -0,0 +1,49 @@ +--- +id: 64a66c917a7d00f97013ed0d +title: The Box Model Question F +challengeType: 15 +dashedName: the-box-model-question-f +--- +# --description-- + +The first important concept that you need to understand to be successful in CSS is the box model. It isn’t complicated, but skipping over it now will cause you much frustration down the line. + +Every single thing on a webpage is a rectangular box. These boxes can have other boxes in them and can sit alongside one another. You can get a rough idea of how this works by sticking a border on every item on the page like this: + +```css +* { + border: 1px solid red; +} +``` + + +# --question-- + +## --assignment-- + +Add a border to every element on the page and see how the boxes are laid out. + +## --text-- + +What is the fundamental concept in CSS that helps you understand the structure of elements as rectangular boxes? + +## --answers-- + +Box-sizing + +--- + +Box-shadow + +--- + +Box model + +--- + +Border-box + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-g.md b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-g.md new file mode 100644 index 00000000000..b8c981a7aa9 --- /dev/null +++ b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-g.md @@ -0,0 +1,52 @@ +--- +id: 64a6702e7a7d00f97013ed0e +title: The Box Model Question G +challengeType: 15 +dashedName: the-box-model-question-g +--- +# --description-- + +![lines](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/odin-lined.png) + +OK, so there might be some circles in the above image… but when it comes to layout, they fit together like rectangular boxes and not circles. In the end, laying out a webpage and positioning all its elements is deciding how you are going to nest and stack these boxes. + +The only real complication here is that there are many ways to manipulate the size of these boxes, and the space between them, using padding, margin, and border. But to sum it up briefly: + +- `padding` increases the space between the border of a box and the content of the box. +- `margin` increases the space between the borders of a box and the borders of adjacent boxes. +- `border` adds space (even if it’s only a pixel or two) between the margin and the padding. + +Be sure to study the diagrams carefully. + +![the box model](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/box-model.png) + +# --question-- + +## --assignment-- + +Add a border to every element on the page and see how the boxes are laid out. + +## --text-- + +From inside to outside, what is the order of box-model properties? + +## --answers-- + +Content, Margin, Padding, Border + +--- + +Margin, Padding, Content, Border + +--- + +Content, Padding, Border, Margin + +--- + +Padding, Content, Border, Margin + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-h.md b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-h.md new file mode 100644 index 00000000000..3c711550b34 --- /dev/null +++ b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-h.md @@ -0,0 +1,37 @@ +--- +id: 64a674937a7d00f97013ed0f +videoId: rIO5326FgPE +title: The Box Model Question H +challengeType: 15 +dashedName: the-box-model-question-h +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +What does the box-sizing CSS property do? + +## --answers-- + +It determines the order of the box-model properties. + +--- + +It specifies the position of an element on the webpage. + +--- + +It controls how the total width and height of an element are calculated. + +--- + +It sets the background color of an element. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-i.md b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-i.md new file mode 100644 index 00000000000..026ca2c2034 --- /dev/null +++ b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-i.md @@ -0,0 +1,36 @@ +--- +id: 64a6749a7a7d00f97013ed10 +videoId: rIO5326FgPE +title: The Box Model Question I +challengeType: 15 +dashedName: the-box-model-question-i +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +What is the difference between the standard and alternative box model? + +## --answers-- + +The standard box model calculates the width and height of an element based on the content alone, while the alternative box model calculates based on the content plus padding and border. + +--- + +The standard box model includes content, padding, and border, while the alternative box model includes only the content. + +--- + +The standard box model and the alternative box model are the same and have no differences. + +--- + +The standard box model includes only the content, while the alternative box model includes content, padding, and border. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-j.md b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-j.md new file mode 100644 index 00000000000..990fedec175 --- /dev/null +++ b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-j.md @@ -0,0 +1,37 @@ +--- +id: 64a674a47a7d00f97013ed11 +videoId: rIO5326FgPE +title: The Box Model Question J +challengeType: 15 +dashedName: the-box-model-question-j +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Would you use margin or padding to create more space between 2 elements? + +## --answers-- + +Padding + +--- + +Both margin and padding can be used interchangeably + +--- + +Neither margin nor padding can be used to create more space between elements + +--- + +Margin + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-k.md b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-k.md new file mode 100644 index 00000000000..933a01523c2 --- /dev/null +++ b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-k.md @@ -0,0 +1,36 @@ +--- +id: 64a674ac7a7d00f97013ed12 +videoId: rIO5326FgPE +title: The Box Model Question K +challengeType: 15 +dashedName: the-box-model-question-k +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Which CSS property would you use to create more space between the contents of an element and its border? + +## --answers-- + +Margin + +--- + +Padding + +--- + +Border + +--- + +Float + +## --video-solution-- + +2 diff --git a/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-l.md b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-l.md new file mode 100644 index 00000000000..80dfdc527af --- /dev/null +++ b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-l.md @@ -0,0 +1,28 @@ +--- +id: 64a674b97a7d00f97013ed13 +videoId: rIO5326FgPE +title: The Box Model Question L +challengeType: 15 +dashedName: the-box-model-question-l +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Would you use margin or padding if you wanted two elements to overlap each other? + +## --answers-- + +Padding + +--- + +Margin + +## --video-solution-- + +2 diff --git a/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-m.md b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-m.md new file mode 100644 index 00000000000..c55213cfd1b --- /dev/null +++ b/curriculum/challenges/swahili/16-the-odin-project/top-the-box-model/the-box-model-question-m.md @@ -0,0 +1,67 @@ +--- +id: 64a674c27a7d00f97013ed14 +videoId: rIO5326FgPE +title: The Box Model Question M +challengeType: 15 +dashedName: the-box-model-question-m +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +How do you set the alternative box model for all of your elements? + +## --answers-- + +```css +html { + box-sizing: inherit; +} +*, +*::before, +*::after { + box-sizing: border-box; +} +``` + +--- + +```css +* { + box-sizing: border-box; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +* { + box-sizing: inherit; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +*, +*::before, +*::after { + box-sizing: inherit; +} +``` + + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/swahili/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md b/curriculum/challenges/swahili/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md index 9793d760c20..93e60e4d425 100644 --- a/curriculum/challenges/swahili/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md +++ b/curriculum/challenges/swahili/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md @@ -62,5 +62,70 @@ doubleBasePalindromes(1000000); # --solutions-- ```js -// solution required +function buildPalindromesBase10(len) { + // Base cases + const palindromes = []; + if (len > 0) { + palindromes.push([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]); + } + if (len > 1) { + palindromes.push([11, 22, 33, 44, 55, 66, 77, 88, 99, 0]); + } + + for (let i = 3; i <= len; i++) { + const lengthIPalindromes = []; + + for (let j = 1; j < 10; j++) { + const firstDigit = j * (10 ** (i - 1)); + const lastDigit = j; + // Build off of palindromes 2 digits shorter + { + const shorterPalindromes = palindromes[i - 3]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 10 + lastDigit); + } + } + // Build off of palindromes 4 digits shorter + if (i > 4) { + const shorterPalindromes = palindromes[i - 5]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 100 + lastDigit); + } + } + } + palindromes.push(lengthIPalindromes); + } + return palindromes.flat(); +} + +function isPalindrome(num) { + const numAsString = num.toString(); + const numDigits = numAsString.length; + for (let i = 0; i < numDigits / 2; i++) { + if (numAsString[i] !== numAsString[numDigits - 1 - i]) { + return false; + } + } + return true; +} + +function isPalindromeBase2(num) { + return isPalindrome(num.toString(2)); +} + +function doubleBasePalindromes(n) { + let palindromeSum = 0; + const maxDigits = Math.ceil(Math.log10(n)); + const palindromesBase10 = buildPalindromesBase10(maxDigits); + + // Loop over all palindromes less than n + for (let i = 0; i < palindromesBase10.length && palindromesBase10[i] < n; i++) { + if (isPalindromeBase2(palindromesBase10[i])) { + palindromeSum += palindromesBase10[i]; + } + } + return palindromeSum; +} ``` diff --git a/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-personal-portfolio-webpage.md b/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-personal-portfolio-webpage.md index 6754bacd209..7af3ba3471a 100644 --- a/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-personal-portfolio-webpage.md +++ b/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-personal-portfolio-webpage.md @@ -24,7 +24,7 @@ dashedName: build-a-personal-portfolio-webpage 1. Висота вітальної секції повинна дорівнювати висоті вюпорту 1. Навігаційна панель завжди повинна знаходитись у верхній частині вюпорту -Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого кодування! +Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого програмування! **Примітка:** переконайтеся, що додали `` до HTML для прив'язки з аркушем стилів та застосували CSS diff --git a/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-product-landing-page.md b/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-product-landing-page.md index 67b681984cf..ee247007ed8 100644 --- a/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-product-landing-page.md +++ b/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-product-landing-page.md @@ -28,7 +28,7 @@ dashedName: build-a-product-landing-page 1. Посадкова сторінка продукту повинна містити щонайменше один медіазапит 1. Посадкова сторінка продукту повинна використовувати CSS flexbox хоча б раз -Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого кодування! +Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого програмування! **Примітка:** переконайтеся, що додали `` до HTML для прив'язки з аркушем стилів та застосували CSS diff --git a/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-survey-form.md b/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-survey-form.md index feddafe3b14..6ce878bd279 100644 --- a/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-survey-form.md +++ b/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-survey-form.md @@ -29,7 +29,7 @@ dashedName: build-a-survey-form 1. В елементі форми представлено `textarea` для додаткових коментарів 1. В елементі форми представлено кнопку з `id` зі значенням `submit` для відправки всіх введень -Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого кодування! +Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого програмування! **Примітка:** переконайтеся, що додали `` до HTML для прив'язки з аркушем стилів та застосували CSS diff --git a/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-technical-documentation-page.md b/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-technical-documentation-page.md index 86cdcbc4af8..45d80db52fd 100644 --- a/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-technical-documentation-page.md +++ b/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-technical-documentation-page.md @@ -28,7 +28,7 @@ dashedName: build-a-technical-documentation-page 1. На пристроях звичайного розміру (портативний чи настільний комп'ютер) елемент з `id="navbar"` повинен відображатись ліворуч на екрані та завжди бути видимим для користувача 1. Ваша технічна документація повинна використовувати принаймні один медіазапит -Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого кодування! +Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого програмування! **Примітка:** переконайтеся, що додали `` до HTML для прив'язки з аркушем стилів та застосували CSS diff --git a/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-tribute-page.md b/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-tribute-page.md index ff0bcf2cc2f..30a77fa0467 100644 --- a/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-tribute-page.md +++ b/curriculum/challenges/ukrainian/01-responsive-web-design/responsive-web-design-projects/build-a-tribute-page.md @@ -22,7 +22,7 @@ dashedName: build-a-tribute-page 1. Ваш `#image` повинен використовувати властивості `max-width` та `height`, щоб змінювати розмір відповідно до ширини батьківського елемента, не перевищуючи початковий розмір 1. Ваш елемент `img` повинен бути зцентрованим відповідно до батьківського елемента -Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого кодування! +Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого програмування! **Примітка:** переконайтеся, що додали `` до HTML для прив'язки з аркушем стилів та застосували CSS diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/profile-lookup.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/profile-lookup.md index 350183bf4fb..5d15ee0223b 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/profile-lookup.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/profile-lookup.md @@ -13,7 +13,7 @@ dashedName: profile-lookup Функція `lookUpProfile`, яка приймає `name` та властивість (`prop`) як аргументи, вже записана для вас. -The function should check if `name` is an actual contact's `firstName` and the given property (`prop`) is a property of that contact. +Функція повинна перевірити, чи `name` дійсно є ім’ям контакту (`firstName`) і надана властивість (`prop`) є властивістю цього контакту. Якщо обидва є істинними, то поверніть значення цієї власності. diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/quoting-strings-with-single-quotes.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/quoting-strings-with-single-quotes.md index 4a1d059ddf1..48033e9973b 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/quoting-strings-with-single-quotes.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/quoting-strings-with-single-quotes.md @@ -22,7 +22,7 @@ const singleQuoteStr = 'This is also a string'; const conversation = 'Finn exclaims to Jake, "Algebraic!"'; ``` -Однак проблема виникає тоді, коли вам потрібно використати зовнішні лапки в межах рядка. Пам'ятайте, що на початку і в кінці рядка використовуються ті ж самі лапки. Але якщо ви використаєте ці лапки всередині рядка, то рядок закінчиться швидше і це призведе до помилки. +Однак проблема виникає тоді, коли вам потрібно використати зовнішні лапки в межах рядка. Пам’ятайте, що на початку і в кінці рядка використовуються ті ж самі лапки. Але якщо ви використаєте ці лапки всередині рядка, то рядок закінчиться швидше і це призведе до помилки. ```js const goodStr = 'Jake asks Finn, "Hey, let\'s go on an adventure?"'; diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md index 9efd53ad9c9..6a822d52591 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md @@ -8,27 +8,27 @@ dashedName: record-collection # --description-- -You are creating a function that aids in the maintenance of a musical album collection. The collection is organized as an object that contains multiple albums which are also objects. Each album is represented in the collection with a unique `id` as the property name. Within each album object, there are various properties describing information about the album. Not all albums have complete information. +Ви створюєте функцію, яка допомагає підтримувати колекцію музичних альбомів. Колекція організована як об’єкт, який містить кілька альбомів, які також є об’єктами. Кожен альбом представлено в колекції унікальним `id` як назвою властивості. У кожному об’єкті альбому є різні властивості, що описують інформацію про альбом. Не всі альбоми мають повну інформацію. -The `updateRecords` function takes 4 arguments represented by the following function parameters: +Функція `updateRecords` приймає 4 аргументи, представлені такими параметрами функції: -- `records` - an object containing several individual albums -- `id` - a number representing a specific album in the `records` object -- `prop` - a string representing the name of the album’s property to update -- `value` - a string containing the information used to update the album’s property +- `records` — об’єкт, що містить декілька окремих альбомів +- `id` — число, що позначає певний альбом в об’єкті `records` +- `prop` — рядок, що позначає назву властивості альбому, яку потрібно оновити +- `value` — рядок, що містить інформацію, яка використовується для оновлення властивості альбому -Complete the function using the rules below to modify the object passed to the function. +Завершіть функцію, використовуючи правила нижче, щоб змінити об’єкт, переданий до функції. -- Your function must always return the entire `records` object. -- If `value` is an empty string, delete the given `prop` property from the album. -- If `prop` isn't `tracks` and `value` isn't an empty string, assign the `value` to that album's `prop`. -- If `prop` is `tracks` and `value` isn't an empty string, you need to update the album's `tracks` array. First, if the album does not have a `tracks` property, assign it an empty array. Then add the `value` as the last item in the album's `tracks` array. +- Ваша функція завжди повинна повертати весь об’єкт `records`. +- Якщо `value` є пустим рядком, видаліть дану властивість `prop` з альбому. +- Якщо `prop` не є `tracks` та `value` не є пустим рядком, призначте `value` до `prop` альбому. +- Якщо `prop` є `tracks` та `value` не є пустим рядком, вам треба оновити масив `tracks` в альбомі. Якщо альбом не має властивості `tracks`, то призначте порожній масив. Потім додайте `value` як останній елемент у масиві `tracks` альбому. -**Note:** A copy of the `recordCollection` object is used for the tests. You should not directly modify the `recordCollection` object. +**Примітка:** копія об’єкту `recordCollection` використовується для тестів. Ви не повинні напряму змінювати об’єкт `recordCollection`. # --hints-- -After `updateRecords(recordCollection, 5439, "artist", "ABBA")`, `artist` should be the string `ABBA` +Після `updateRecords(recordCollection, 5439, "artist", "ABBA")`, `artist` має стати рядком `ABBA` ```js assert( @@ -37,7 +37,7 @@ assert( ); ``` -After `updateRecords(recordCollection, 5439, "tracks", "Take a Chance on Me")`, `tracks` should have the string `Take a Chance on Me` as the last and only element. +Після `updateRecords(recordCollection, 5439, "tracks", "Take a Chance on Me")`, `tracks` повинен мати рядок `Take a Chance on Me` як останній та єдиний елемент. ```js assert( @@ -47,14 +47,14 @@ assert( ); ``` -After `updateRecords(recordCollection, 2548, "artist", "")`, `artist` should not be set +Після `updateRecords(recordCollection, 2548, "artist", "")`, `artist` не має бути налаштованим ```js updateRecords(_recordCollection, 2548, 'artist', ''); assert(!_recordCollection[2548].hasOwnProperty('artist')); ``` -After `updateRecords(recordCollection, 1245, "tracks", "Addicted to Love")`, `tracks` should have the string `Addicted to Love` as the last element. +Після `updateRecords(recordCollection, 1245, "tracks", "Addicted to Love")`, `tracks` повинен мати рядок `Addicted to Love` як останній елемент. ```js assert( @@ -64,7 +64,7 @@ assert( ); ``` -After `updateRecords(recordCollection, 2468, "tracks", "Free")`, `tracks` should have the string `1999` as the first element. +Після `updateRecords(recordCollection, 2468, "tracks", "Free")`, `tracks` повинен мати рядок `1999` як перший елемент. ```js assert( @@ -74,14 +74,14 @@ assert( ); ``` -After `updateRecords(recordCollection, 2548, "tracks", "")`, `tracks` should not be set +Після `updateRecords(recordCollection, 2548, "tracks", "")`, `tracks` не має бути налаштованим ```js updateRecords(_recordCollection, 2548, 'tracks', ''); assert(!_recordCollection[2548].hasOwnProperty('tracks')); ``` -After `updateRecords(recordCollection, 1245, "albumTitle", "Riptide")`, `albumTitle` should be the string `Riptide` +Після `updateRecords(recordCollection, 1245, "albumTitle", "Riptide")`, `albumTitle` має стати рядком `Riptide` ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/replace-loops-using-recursion.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/replace-loops-using-recursion.md index 62673efebd4..4b5c11b0be7 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/replace-loops-using-recursion.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/replace-loops-using-recursion.md @@ -10,7 +10,7 @@ dashedName: replace-loops-using-recursion # --description-- -Рекурсія – це концепція того, що функція може бути виражена сама собою. Щоб краще зрозуміти, подумайте над наступним завданням: перемножте перші `n` елементи масиву, щоб отримати їх добуток. Ви могли б це зробити, використовуючи цикл `for`: +Рекурсія — це концепція того, що функція може бути виражена сама собою. Щоб краще зрозуміти, подумайте над наступним завданням: перемножте перші `n` елементи масиву, щоб отримати їх добуток. Ви могли б це зробити, використовуючи цикл `for`: ```js function multiply(arr, n) { diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.md index 141618eebd4..6f21afca4cb 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.md @@ -9,7 +9,7 @@ dashedName: selecting-from-many-options-with-switch-statements # --description-- -If you need to match one value against many options, you can use a switch statement. A `switch` statement compares the value to the case statements which define various possible values. Any valid JavaScript statements can be executed inside a case block and will run from the first matched `case` value until a `break` is encountered. +Якщо вам потрібно зіставити одне значення з багатьма варіантами, ви можете використати інструкцію switch. Інструкція `switch` порівнює значення з інструкціями case, які визначають різні можливі значення. Будь-які дійсні інструкції JavaScript можуть бути виконані всередині блоку case та виконуватимуться з першого зіставленого значення `case`, доки не зустрінеться `break`. Ось приклад інструкції `switch`: diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/shopping-list.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/shopping-list.md index 2f73e75582c..35a17a2294e 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/shopping-list.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/shopping-list.md @@ -17,7 +17,7 @@ dashedName: shopping-list ["Chocolate Bar", 15] ``` -У списку повинно бути принаймні 5 підмасивів. +У списку повинно бути принаймні 5 вкладених масивів. # --hints-- @@ -39,7 +39,7 @@ assert(hasString); assert(hasNumber); ``` -У списку повинно бути принаймні 5 одиниць. +У списку повинно бути принаймні п’ять товарів. ```js assert(count > 4); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/stand-in-line.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/stand-in-line.md index 4fe1beba95e..563393db35a 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/stand-in-line.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/stand-in-line.md @@ -9,7 +9,7 @@ dashedName: stand-in-line # --description-- -Черга в комп’ютерних науках – це абстрактна структура даних, де усі елементи зберігають певний порядок. Нові елементи можна додати в кінець черги, а старі елементи знімають з початку. +Черга в комп’ютерних науках — це абстрактна структура даних, де усі елементи зберігають певний порядок. Нові елементи можна додати в кінець черги, а старі елементи забрати з початку. # --instructions-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/testing-objects-for-properties.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/testing-objects-for-properties.md index 83ed563dc62..8e899198ff5 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/testing-objects-for-properties.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/testing-objects-for-properties.md @@ -8,7 +8,7 @@ dashedName: testing-objects-for-properties # --description-- -To check if a property on a given object exists or not, you can use the `.hasOwnProperty()` method. `someObject.hasOwnProperty(someProperty)` returns `true` or `false` depending on if the property is found on the object or not. +Щоб перевірити, чи існує властивість даного об’єкта, ви можете скористатися методом `.hasOwnProperty()`. `someObject.hasOwnProperty(someProperty)` повертає `true` або `false` залежно від того, знайдено властивість в об’єкті чи ні. **Приклад** @@ -21,11 +21,11 @@ checkForProperty({ top: 'hat', bottom: 'pants' }, 'top'); // true checkForProperty({ top: 'hat', bottom: 'pants' }, 'middle'); // false ``` -The first `checkForProperty` function call returns `true`, while the second returns `false`. +Перший виклик функції `checkForProperty` повертає `true`, а другий повертає `false`. # --instructions-- -Modify the function `checkObj` to test if the object passed to the function parameter `obj` contains the specific property passed to the function parameter `checkProp`. If the property passed to `checkProp` is found on `obj`, return that property's value. If not, return `Not Found`. +Змініть функцію `checkObj` так, щоб вона перевіряла, чи переданий до функції параметр `obj` містить певну властивість, передану параметру функції `checkProp`. Якщо властивість, передану до `checkProp`, знайдено в `obj`, поверніть значення цієї властивості. Якщо ні, поверніть `Not Found`. # --hints-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understand-string-immutability.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understand-string-immutability.md index 17838d6240a..2674ca9871a 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understand-string-immutability.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understand-string-immutability.md @@ -18,7 +18,7 @@ let myStr = "Bob"; myStr[0] = "J"; ``` -Зауважте, що це *не* означає, що `myStr` не можна повторно присвоїти. Єдиний спосіб змінити `myStr` – присвоїти нове значення: +Зауважте, що це *не* означає, що `myStr` не можна повторно присвоїти. Єдиний спосіб змінити `myStr` — присвоїти нове значення: ```js let myStr = "Bob"; diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-case-sensitivity-in-variables.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-case-sensitivity-in-variables.md index 320f8759ee6..669e194a131 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-case-sensitivity-in-variables.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-case-sensitivity-in-variables.md @@ -11,11 +11,11 @@ dashedName: understanding-case-sensitivity-in-variables Усі назви змінних та функцій у JavaScript чуттєві до регістру. Це означає, що написання з великої літери має значення. -`MYVAR` – це не саме, що `MyVar` чи `myvar`. Ви можете мати декілька різних змінних з одинаковою назвою, але різним регістром. Заради чіткості рекомендовано *не* використовувати цю особливість мови. +`MYVAR` — не те саме, що `MyVar` чи `myvar`. Ви можете мати декілька різних змінних з одинаковою назвою, але різним регістром. Заради чіткості рекомендовано *не* використовувати цю особливість мови. **Найкраща практика** -Напишіть назви змінних у JavaScript верблюдячимРегістром. Назви змінних верблюдячимРегістром складаються з декількох слів, де перше слово ми пишемо з малої букви, а першу букву кожного наступного слова пишемо з великої. +Записуйте назви змінних у JavaScript верблюдячимРегістром. Назви змінних верблюдячимРегістром складаються з декількох слів, де перше слово ми пишемо з малої букви, а першу букву кожного наступного слова пишемо з великої. **Приклади:** diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables.md index 81600b1d38d..37bc887c1de 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables.md @@ -9,7 +9,7 @@ dashedName: understanding-uninitialized-variables # --description-- -Коли змінні у JavaScript оголошено, вони отримують початкове значення `undefined`. Якщо виконати математичну дію на змінній `undefined`, то результатом буде `NaN`, що означає «Not a Number» (укр. «не є числом»). Якщо об’єднати рядок зі змінною `undefined`, ви отримаєте рядок з `undefined`. +Коли змінні у JavaScript оголошено, вони отримують початкове значення `undefined`. Якщо виконати математичну дію на змінній `undefined`, то результатом буде `NaN`, що означає «Not a Number» (укр. «не є числом»). Якщо об’єднати рядок зі змінною `undefined`, ви отримаєте рядок `undefined`. # --instructions-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator.md index c424bf5510e..fee28caf02f 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator.md @@ -10,7 +10,7 @@ dashedName: use-the-conditional-ternary-operator Умовний оператор, який також називається тернарним оператором, можна використовувати як однорядкову інструкцію «if-else». -Синтаксисом є `a ? b : c`, де `a` – умова, `b` – код, якщо умова повертає `true` та `c` – код, якщо умова повертає `false`. +Синтаксисом є `a ? b : c`, де `a` — умова, `b` — код, якщо умова повертає `true` та `c` — код, якщо умова повертає `false`. Ця функція використовує інструкцію `if/else`, щоб перевірити умову: diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md index 2af4898596d..29bba954092 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md @@ -39,23 +39,16 @@ assert(code.match(/\.slice/g)); assert(!code.match(/\.?[\s\S]*?splice/g)); ``` -Масив `inputCities` не повинен змінюватись. +Не змінюйте початковий масив, переданий до функції. ```js -assert( - JSON.stringify(inputCities) === - JSON.stringify(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) -); +assert.deepEqual(_inputCities, ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]); ``` `nonMutatingSplice(["Chicago", "Delhi", "Islamabad", "London", "Berlin"])` має повертати `["Chicago", "Delhi", "Islamabad"]`. ```js -assert( - JSON.stringify( - nonMutatingSplice(['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']) - ) === JSON.stringify(['Chicago', 'Delhi', 'Islamabad']) -); +assert.deepEqual(nonMutatingSplice(_inputCities), ["Chicago", "Delhi", "Islamabad"]); ``` # --seed-- @@ -64,14 +57,15 @@ assert( ```js function nonMutatingSplice(cities) { - // Only change code below this line + return cities.splice(3); - - // Only change code above this line } +``` -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; -nonMutatingSplice(inputCities); +## --after-user-code-- + +```js +const _inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` # --solutions-- @@ -80,5 +74,4 @@ nonMutatingSplice(inputCities); function nonMutatingSplice(cities) { return cities.slice(0,3); } -const inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; ``` diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance.md index 80027fccb30..0d0d23c2925 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance.md @@ -8,9 +8,9 @@ dashedName: add-methods-after-inheritance # --description-- -Функція конструктора, яка успадковує свій об'єкт `prototype` від функції супертипу конструктора, все ще може мати свої власні методи на додачу до успадкованих методів. +Функція-конструктор, яка успадковує об’єкт `prototype` від функції-конструктора супертипу, всеодно може мати власні методи на додачу до успадкованих. -Наприклад, `Bird` – це конструктор, який успадковує `prototype` від `Animal`: +Наприклад, `Bird` є конструктором, який успадковує `prototype` від `Animal`: ```js function Animal() { } @@ -22,7 +22,7 @@ Bird.prototype = Object.create(Animal.prototype); Bird.prototype.constructor = Bird; ``` -Окрім того, що успадковано від `Animal`, за бажанням можна додати поведінку, унікальну для об'єктів `Bird`. У такому разі `Bird` отримує функцію `fly()`. Функції додаються до `Bird's` `prototype` так само, як і будь-яка функція конструктора: +Окрім успадкованого від `Animal`, за бажанням можна додати поведінку, унікальну для об’єктів `Bird`. У такому разі `Bird` отримує функцію `fly()`. Функції додаються до прототипу `Bird` так само, як і будь-яка функція-конструктор: ```js Bird.prototype.fly = function() { @@ -30,7 +30,7 @@ Bird.prototype.fly = function() { }; ``` -Тепер екземпляри `Bird` матимуть обидва методи: `eat()` та `fly()`: +Тепер екземпляри `Bird` матимуть методи `eat()` та `fly()`: ```js let duck = new Bird(); @@ -38,45 +38,45 @@ duck.eat(); duck.fly(); ``` -`duck.eat()` показуватиме рядок `nom nom nom` у консолі, а `duck.fly()` показуватиме рядок `I'm flying!`. +`duck.eat()` показуватиме рядок `nom nom nom` на консолі, а `duck.fly()` показуватиме рядок `I'm flying!`. # --instructions-- -Додайте все необхідне кодування так, щоб об’єкт `Dog` успадковував від `Animal`, а конструктор `Dog` `prototype` був встановлений для `Dog`. Потім використайте метод `bark()` `Dog` щодо об'єкта, щоб `beagle` міг водночас `eat()` й `bark()`. Метод `bark()` треба вводити `Woof!` на консоль. +Додайте необхідний код так, щоб об’єкт `Dog` успадковував від `Animal`, а прототип конструктора `Dog` був налаштований на `Dog`. Потім додайте метод `bark()` до об’єкта `Dog`, щоб `beagle` міг `eat()` та `bark()`. Метод `bark()` має вивести `Woof!` на консоль. # --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'); ``` -`Dog` прототип повинен містити в собі метод `bark()`. +Прототип `Dog` повинен мати метод `bark()`. ```js assert('bark' in Dog.prototype); ``` -`beagle`повинен мати `instanceof` `Animal`. +`beagle` має бути екземпляром `Animal`. ```js assert(beagle instanceof Animal); ``` -Конструктор для `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/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/change-the-prototype-to-a-new-object.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/change-the-prototype-to-a-new-object.md index f830b9ed07c..3159c8ecd3b 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/change-the-prototype-to-a-new-object.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/change-the-prototype-to-a-new-object.md @@ -1,6 +1,6 @@ --- id: 587d7daf367417b2b2512b7f -title: Зміна прототипа новим об'єктом +title: Зміна прототипа на новий об’єкт challengeType: 1 forumTopicId: 301316 dashedName: change-the-prototype-to-a-new-object @@ -8,13 +8,13 @@ dashedName: change-the-prototype-to-a-new-object # --description-- -До цього часу ви окремо додавали властивості до `prototype`: +До цього часу ви додавали властивості до `prototype` окремо: ```js Bird.prototype.numLegs = 2; ``` -Використання більше ніж декількох властивостей виснажує. +Використання декількох властивостей виснажує. ```js Bird.prototype.eat = function() { @@ -26,7 +26,7 @@ Bird.prototype.describe = function() { } ``` -Більш ефективним способом буде встановлення `prototype` до нового об’єкта, який вже містить ці властивості. Так, властивості додаються одразу: +Ефективніше налаштувати `prototype` на новий об’єкт, який вже містить ці властивості. Таким чином всі властивості додаються одразу: ```js Bird.prototype = { @@ -42,17 +42,17 @@ Bird.prototype = { # --instructions-- -Додайте властивість `numLegs` і два методи `eat()` і `describe()` до `prototype` з `Dog`, встановивши `prototype` до нового об'єкта. +Додайте властивість `numLegs` і два методи (`eat()` й `describe()`) до прототипу `Dog`, встановивши `prototype` на новий об’єкт. # --hints-- -`Dog.prototype` має бути встановлений на новий об'єкт. +Налаштуйте `Dog.prototype` на новий об’єкт. ```js assert(/Dog\.prototype\s*?=\s*?{/.test(code)); ``` -`Dog.prototype` повинен містити властивість `numLegs`. +`Dog.prototype` повинен мати властивість `numLegs`. ```js assert(Dog.prototype.numLegs !== undefined); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/create-a-basic-javascript-object.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/create-a-basic-javascript-object.md index fa4c239d395..cb10cd5a437 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/create-a-basic-javascript-object.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/create-a-basic-javascript-object.md @@ -1,6 +1,6 @@ --- id: 587d7dac367417b2b2512b73 -title: Створення базового об'єкту JavaScript +title: Створення базового об’єкта JavaScript challengeType: 1 forumTopicId: 301317 dashedName: create-a-basic-javascript-object @@ -8,13 +8,13 @@ dashedName: create-a-basic-javascript-object # --description-- -Подумайте про речі, що оточують людей щодня. До прикладу, машини, крамниці, птахи. Вони є об'єктами: реальними речами, за якими можна як спостерігати, так і взаємодіяти з ними. +Подумайте про речі, що оточують людей щодня. До прикладу, машини, крамниці, птахи. Вони є об’єктами: реальними речами, за якими можна як спостерігати, так і взаємодіяти з ними. -Якими є якості цих об'єктів? Машина має колеса. В крамниці продають продукти. У птахів є крила. +Якими є якості цих об’єктів? Машина має колеса. В крамниці продають продукти. У птахів є крила. -Ці якості, або властивості, визначають чим є сам об'єкт. Зауважте, що схожі об'єкти мають однакові властивості, але їхні значення для кожного із об'єктів можуть відрізнятися. Наприклад, усі машини мають колеса, але не всі машини мають однакову їхню кількість. +Ці якості, або властивості, визначають з чого складається об’єкт. Зауважте, що схожі об’єкти мають однакові властивості, але їхні значення для кожного з об’єктів можуть відрізнятися. Наприклад, усі машини мають колеса, але не всі машини мають однакову кількість. -Об'єкти JavaScript використовуються для моделювання об'єктів із реального світу, наділяючись такими ж як і їхні дійсні двійники властивостями і поведінкою. Ось приклад використання цієї ідеї для створення об'єкту `duck`: +Об’єкти JavaScript використовують для моделювання об’єктів із реального світу, наділяючи їх такими ж властивостями і поведінкою, що й дійсні двійники. Ось приклад використання цієї ідеї для створення об’єкта `duck`: ```js let duck = { @@ -23,27 +23,27 @@ let duck = { }; ``` -Об'єкт `duck` має дві пари властивостей із значеннями: `name` із значенням `Aflac`, `numLegs` із значенням 2. +Об’єкт `duck` має дві пари властивості-значення: `name` зі значенням `Aflac` та `numLegs` зі значенням 2. # --instructions-- -Створіть об'єкт `dog` із властивостями `name` та `numLegs`, задавши їхні значення рядком символів та числом відповідно. +Створіть об’єкт `dog` з властивостями `name` та `numLegs`, а потім налаштуйте їхні значення на рядок та число відповідно. # --hints-- -`dog` повинен бути об'єктом. +`dog` має бути об’єктом. ```js assert(typeof dog === 'object'); ``` -`dog` повинен мати виражену рядком символів властивість `name`. +`dog` повинен мати властивість `name` зі значенням рядка. ```js assert(typeof dog.name === 'string'); ``` -`dog` повинен мати виражену числом властивість `numLegs`. +`dog` повинен мати властивість `numLegs` зі значенням числа. ```js assert(typeof dog.numLegs === 'number'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/create-a-method-on-an-object.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/create-a-method-on-an-object.md index d687a12ee57..aa21eb50ece 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/create-a-method-on-an-object.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/create-a-method-on-an-object.md @@ -1,6 +1,6 @@ --- id: 587d7dad367417b2b2512b75 -title: Створення методу для об'єкту +title: Створення методу для об’єкта challengeType: 1 forumTopicId: 301318 dashedName: create-a-method-on-an-object @@ -8,9 +8,9 @@ dashedName: create-a-method-on-an-object # --description-- -Об'єкти можуть мати особливі типи властивостей, названі методами. +Об’єкти можуть мати особливі типи властивостей, які називають методами. -Методи - це властивості, що є функціями. Вони додають об'єктам можливості іншої поведінки. Ось приклад об'єкту `duck` із методом: +Методи — це властивості, що є функціями. Вони додають об’єктам іншу поведінку. Ось приклад об’єкта `duck` із методом: ```js let duck = { @@ -21,11 +21,11 @@ let duck = { duck.sayName(); ``` -У прикладі додається метод `sayName`, який є функцією що повертає речення із іменем об'єкту `duck`. Зверніть увагу, що метод отримує доступ до властивості `name` в інструкції return за допомогою `duck.name`. У наступному завданні буде розглянуто інший спосіб це зробити. +У прикладі додається метод `sayName`, який є функцією, що повертає речення із назвою об’єкта `duck`. Зверніть увагу, що метод отримує доступ до властивості `name` в інструкції return за допомогою `duck.name`. У наступному завданні буде розглянуто інший спосіб це зробити. # --instructions-- -Створіть метод `sayLegs` для об'єкту `dog`. Цей метод повинен повертати речення `This dog has 4 legs.` +Створіть метод `sayLegs` для об’єкта `dog`. Метод має повернути речення `This dog has 4 legs.` # --hints-- @@ -35,7 +35,7 @@ duck.sayName(); assert(typeof dog.sayLegs === 'function'); ``` -`dog.sayLegs()` повинен повертати заданий рядок символів зберігаючи пунктуацію та відступи. +`dog.sayLegs()` має повернути заданий рядок, зберігаючи пунктуацію та відступи. ```js assert(dog.sayLegs() === 'This dog has 4 legs.'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/define-a-constructor-function.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/define-a-constructor-function.md index 2dc459e4a9a..15d49904d40 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/define-a-constructor-function.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/define-a-constructor-function.md @@ -1,6 +1,6 @@ --- id: 587d7dad367417b2b2512b77 -title: Визначення функції конструктора +title: Визначення функції-конструктора challengeType: 1 forumTopicId: 16804 dashedName: define-a-constructor-function @@ -8,7 +8,7 @@ dashedName: define-a-constructor-function # --description-- -Конструктори є функціями, що створюють нові об'єкти. Вони визначають властивості та поведінку, що будуть належати новому об'єкту. Можна вважати їх кресленням, планом для створення нових об'єктів. +Конструктори — це функції, які створюють нові об’єкти. Вони визначають властивості та поведінку, що будуть належати новому об’єкту. Їх можна вважати основою для створення нових об’єктів. Ось приклад конструктора: @@ -20,29 +20,29 @@ function Bird() { } ``` -Цей конструктор визначає об'єкт `Bird` із властивостями `name`, `color`, та `numLegs` із встановленими значеннями Albert, blue та 2 відповідно. При створенні конструкторів дотримуються кількох умов: +Цей конструктор визначає об’єкт `Bird` із властивостями `name`, `color` та `numLegs` зі значеннями Albert, blue та 2 відповідно. При створенні конструкторів дотримуються кількох умов: - + # --instructions-- -Створіть конструктор `Dog` із властивостями `name`, `color`, та `numLegs`, які будуть визначені двома рядками символів та числом відповідно. +Створіть конструктор `Dog` з властивостями `name`, `color` та `numLegs`, а потім налаштуйте їхні значення на рядок, рядок та число відповідно. # --hints-- -`Dog` повинен мати властивість `name` визначену рядком символів. +`Dog` повинен мати властивість `name` зі значенням рядка. ```js assert(typeof new Dog().name === 'string'); ``` -`Dog` повинен мати властивість `color` визначену рядком символів. +`Dog` повинен мати властивість `color` зі значенням рядка. ```js assert(typeof new Dog().color === 'string'); ``` -`Dog` повинен мати властивість `numLegs` визначену числом. +`Dog` повинен мати властивість `numLegs` зі значенням числа. ```js assert(typeof new Dog().numLegs === 'number'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/extend-constructors-to-receive-arguments.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/extend-constructors-to-receive-arguments.md index 897ab452d50..690e6297eac 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/extend-constructors-to-receive-arguments.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/extend-constructors-to-receive-arguments.md @@ -1,6 +1,6 @@ --- id: 587d7dae367417b2b2512b79 -title: Розширити конструктори для отримання аргументів +title: Розширення конструкторів для отримання аргументів challengeType: 1 forumTopicId: 18235 dashedName: extend-constructors-to-receive-arguments @@ -8,7 +8,7 @@ dashedName: extend-constructors-to-receive-arguments # --description-- -Конструктори `Bird` та `Dog` з останнього завдання працювали добре. Однак зверніть увагу, що всі `Birds`, створені за допомогою конструктора `Bird`, автоматично називаються Альбертом, мають синій колір і мають дві ніжки. Що робити, якщо вам потрібні birds з різними значеннями для назви та кольору? Змінити властивості кожної bird можна вручну, але це займе багато часу: +Конструктори `Bird` та `Dog` з останнього завдання працювали добре. Однак зверніть увагу, що всі пташки, створені за допомогою конструктора `Bird`, автоматично називаються Альбертом, мають синій колір і мають дві ніжки. Що робити, якщо потрібні пташки з різними значеннями назви та кольору? Змінити властивості кожної пташки можна вручну, але це займе багато часу: ```js let swan = new Bird(); @@ -16,7 +16,7 @@ swan.name = "Carlos"; swan.color = "white"; ``` -Припустимо, ви писали програму для відстеження сотень чи навіть тисяч різних bird у вольєрі. Це займе багато часу, щоб створити всі birds, а потім змінити для кожного властивості на різні значення. Щоб легше створювати різні об'єкти `Bird`, ви можете спроектувати свій конструктор Bird для прийняття параметрів: +Припустимо, ви писали програму для відстеження сотень чи навіть тисяч різних пташок у пташнику. Створення всіх пташок займе багато часу, а потім ще потрібно змінити значення властивостей. Щоб легше створювати різні об’єкти `Bird`, ви можете спроєктувати конструктор для прийняття параметрів: ```js function Bird(name, color) { @@ -26,7 +26,7 @@ function Bird(name, color) { } ``` -Потім передайте значення в якості аргументів для визначення кожного унікального bird в конструкторі `Bird`: `let cardinal = new Bird("Bruce", "red");` Це дає новий екземпляр `Bird` із властивостями `name` та `color`, встановленими відповідно до `Bruce` та й відповідно до `red`. Для властивості `numLegs` все ще відповідає значення 2. `cardinal` має такі властивості: +Потім передайте значення як аргументи, щоб визначити кожну унікальну пташку в конструкторі `Bird`: `let cardinal = new Bird("Bruce", "red");`. Ви отримаєте новий екземпляр `Bird` із властивостями `name` та `color` з відповідними значеннями `Bruce` та `red`. Властивість `numLegs` досі має значення 2. `cardinal` має такі властивості: ```js cardinal.name @@ -34,11 +34,11 @@ cardinal.color cardinal.numLegs ``` -Конструктор є більш гнучким. Тепер можна визначити властивості для кожної `Bird` під час її створення, що є одним із способів, яким конструктори JavaScript так корисні. Вони поєднують об’єкти разом на основі спільних характеристик та поведінки та визначають план, який автоматизує створення. +Конструктор є більш гнучким. Тепер можна визначити властивості для кожної пташки під час її створення, що є однією з причин, чому конструктори JavaScript такі корисні. Вони групують об’єкти на основі спільних характеристик і поведінки та визначають план, який автоматизує їхнє створення. # --instructions-- -Створіть ще один конструктор `Dog`. Цього разу встановіть його так щоб прийняти параметри `name` та `color` і встановіть властивість `numLegs` на 4. Потім створіть новий `Dog`, збережений у змінній `terrier`. Передайте два рядки в якості аргументів для властивостей `name` and `color`. +Створіть ще один конструктор `Dog`. Цього разу налаштуйте його так, щоб він приймав параметри `name` та `color`, і встановіть властивість `numLegs` на 4. Потім створіть новий `Dog`, збережений у змінній `terrier`. Передайте два рядки як аргументи до властивостей `name` та `color`. # --hints-- @@ -54,13 +54,13 @@ assert(new Dog('Clifford').name === 'Clifford'); assert(new Dog('Clifford', 'yellow').color === 'yellow'); ``` -`Dog` має мати властивості `numLegs` значення 4. +`Dog` повинен мати властивість `numLegs` зі значенням 4. ```js assert(new Dog('Clifford').numLegs === 4); ``` -`terrier` слід створити за допомогою конструктора `Dog`. +Створіть `terrier` за допомогою конструктора `Dog`. ```js assert(terrier instanceof Dog); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/inherit-behaviors-from-a-supertype.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/inherit-behaviors-from-a-supertype.md index 720485aa7d3..f4450106b96 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/inherit-behaviors-from-a-supertype.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/inherit-behaviors-from-a-supertype.md @@ -1,6 +1,6 @@ --- id: 587d7db0367417b2b2512b84 -title: Унаслідуйте поведінку від Supertype +title: Успадкування поведінки від супертипу challengeType: 1 forumTopicId: 301319 dashedName: inherit-behaviors-from-a-supertype @@ -8,7 +8,7 @@ dashedName: inherit-behaviors-from-a-supertype # --description-- -У попередньому завданні ви створили `supertype`під назвою `Animal`, який визначав поведінку, спільну для всіх тварин: +У попередньому завданні ви створили `supertype` під назвою `Animal`, який визначав поведінку, спільну для всіх тварин: ```js function Animal() { } @@ -17,46 +17,46 @@ Animal.prototype.eat = function() { }; ``` -Це та наступне завдання стосуватиметься того, як повторно використати методи `Animal` всередині `Bird` та `Dog`, не визначаючи їх знову. Там використовується прийом, що називається inheritance (успадкування). Це завдання охоплює перший крок: створити екземпляр `supertype` (або батьківський компонент). Вам вже відомий один спосіб створити екземпляр `Animal` за допомогою оператора `new`: +Це та наступне завдання стосуватиметься того, як повторно використати методи `Animal` всередині `Bird` та `Dog`, не визначаючи їх знову. Тут використовується техніка, що називається успадкуванням. Це завдання охоплює перший крок: створити екземпляр `supertype` (або батьківський елемент). Вам вже відомий один спосіб створити екземпляр `Animal` за допомогою оператора `new`: ```js let animal = new Animal(); ``` -Використання цього синтаксису для inheritance має деякі недоліки, які є надто складними для охоплення цієї сфери проблеми. Натомість, ось альтернативний підхід без цих недоліків: +Цей синтаксис успадкування має деякі недоліки, які надто складні для цього завдання. Ось альтернативний підхід без цих недоліків: ```js let animal = Object.create(Animal.prototype); ``` -`Object.create(obj)` створює новий об'єкт і встановлює `obj` як `prototype`. Нагадаємо, що `prototype` є своєрідним «рецептом» для створення об'єкта. Встановивши `prototype` `animal` як `prototype` `Animal`, ви фактично надаєте `animal` екземпляр того ж "рецепта", що і будь -який інший екземпляр `Animal`. +`Object.create(obj)` створює новий об’єкт і налаштовує `obj` як `prototype`. Нагадаємо, що `prototype` є своєрідним «рецептом» для створення об’єкта. Встановивши `animal` `prototype` як `Animal` `prototype`, ви фактично надаєте `animal` екземпляр того ж «рецепта», що і будь-який інший екземпляр `Animal`. ```js animal.eat(); animal instanceof Animal; ``` -Метод `instanceof` тут повертає `true`. +Метод `instanceof` поверне `true`. # --instructions-- -Використовуйте `Object.create`, щоб створити два екземпляри `Animal` з іменами `duck` та `beagle`. +Використайте `Object.create`, щоб створити два екземпляри `Animal` під назвою `duck` та `beagle`. # --hints-- -Повинна бути визначена змінна `duck`. +Змінна `duck` має бути визначеною. ```js assert(typeof duck !== 'undefined'); ``` -Повинна бути визначена змінна `beagle`. +Змінна `beagle` має бути визначеною. ```js assert(typeof beagle !== 'undefined'); ``` -Змінна `duck` повинна ініціалізуватися за допомогою `Object.create`. +Змінну `duck` потрібно ініціалізувати, використавши `Object.create`. ```js assert( @@ -66,7 +66,7 @@ assert( ); ``` -Змінна `beagle` повинна бути ініціалізована за допомогою `Object.create`. +Змінну `beagle` потрібно ініціалізувати, використавши `Object.create`. ```js assert( @@ -76,13 +76,13 @@ assert( ); ``` -`duck` повинна мати `prototype` з `Animal`. +`duck` повинна мати `Animal` `prototype`. ```js assert(duck instanceof Animal); ``` -`beagle` повинна мати `prototype` з `Animal`. +`beagle` повинна мати `Animal` `prototype`. ```js assert(beagle instanceof Animal); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/iterate-over-all-properties.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/iterate-over-all-properties.md index 83c2f285520..e8669203e4d 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/iterate-over-all-properties.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/iterate-over-all-properties.md @@ -1,6 +1,6 @@ --- id: 587d7daf367417b2b2512b7d -title: Ітерація усіх властивостей +title: Ітерація через усі властивості challengeType: 1 forumTopicId: 301320 dashedName: iterate-over-all-properties @@ -8,7 +8,7 @@ dashedName: iterate-over-all-properties # --description-- -Тепер ви вже бачили два типи властивостей: own properties and `prototype` properties. Власні властивості визначаються безпосередньо в самому екземплярі об'єкта. А властивості прототипу визначені в `prototype`. +Ви бачили два типи властивостей: власні властивості та властивості прототипу. Власні властивості визначаються в самому екземплярі об’єкта. А властивості прототипу визначені в `prototype`. ```js function Bird(name) { @@ -20,7 +20,7 @@ Bird.prototype.numLegs = 2; // prototype property let duck = new Bird("Donald"); ``` -Ось як ви додаєте власні властивості `duck` до масиву `ownProps` і властивостей `prototype` до масиву `prototypeProps`: +Ось так ви додаєте власні властивості `duck` до масиву `ownProps` і властивості `prototype` до масиву `prototypeProps`: ```js let ownProps = []; @@ -38,11 +38,11 @@ console.log(ownProps); console.log(prototypeProps); ``` -`console.log(ownProps)` відобразить `["name"]` в консолі, і `console.log(prototypeProps)` відображатиме `["numLegs"]`. +`console.log(ownProps)` виведе `["name"]` на консолі, а `console.log(prototypeProps)` виведе `["numLegs"]`. # --instructions-- -Додайте всі власні властивості `beagle` до масиву `ownProps`. Додайте всі властивості `prototype` `Dog` до масиву `prototypeProps`. +Додайте всі власні властивості `beagle` до масиву `ownProps`. Додайте всі властивості прототипу `Dog` до масиву `prototypeProps`. # --hints-- @@ -58,7 +58,7 @@ assert.deepEqual(ownProps, ['name']); assert.deepEqual(prototypeProps, ['numLegs']); ``` -Ви повинні вирішити цей виклик без використання побудови в методі `Object.keys()`. +Виконайте це завдання, не використовуючи вбудований метод `Object.keys()`. ```js assert(!/\Object.keys/.test(code)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/make-code-more-reusable-with-the-this-keyword.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/make-code-more-reusable-with-the-this-keyword.md index f892dcbfb34..acf98fd6e84 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/make-code-more-reusable-with-the-this-keyword.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/make-code-more-reusable-with-the-this-keyword.md @@ -1,6 +1,6 @@ --- id: 587d7dad367417b2b2512b76 -title: Зробити код більш придатним для повторного використання з цим ключовим словами +title: Повторне використання коду з ключовим словом this challengeType: 1 forumTopicId: 301321 dashedName: make-code-more-reusable-with-the-this-keyword @@ -8,15 +8,15 @@ dashedName: make-code-more-reusable-with-the-this-keyword # --description-- -У попередньому завданні було представлено метод для об'єкту `duck`. Він використовував крапкову нотацію `duck.name` для доступу до властивості `name` в межах інструкції return: +У попередньому завданні ви ознайомились з методом об’єкта `duck`. Було використано точкову нотацію `duck.name`, щоб отримати доступ до значення властивості `name` в межах інструкції return: ```js sayName: function() {return "The name of this duck is " + duck.name + ".";} ``` -Це допустимий спосіб отримати доступ до властивості об'єкту, але тут є свої підводні камені. Якщо зміниться назва змінної, то й будь-які посилання коду до початкової назви необхідно буде також оновити. Це не становить проблеми в короткому визначенні об'єкту, але якщо посилань до властивостей об'єкту є багато, то й шанси на помилку збільшуються. +Це допустимий спосіб отримати доступ до властивості об’єкта, але зі своїми підводними каменями. Якщо зміниться назва змінної, то й будь-які посилання коду до початкової назви необхідно буде також оновити. Це не становить проблеми в короткому визначенні об’єкта, але якщо посилань багато, то шанси на помилку збільшуються. -Уникнути цієї проблеми можна за допомогою кодового слова `this`: +Уникнути цієї проблеми можна за допомогою ключового слова `this`: ```js let duck = { @@ -26,21 +26,21 @@ let duck = { }; ``` -`this` є доволі багатогранною темою, а наведений вище приклад є лише одним із способів його використання. У даному контексті `this` посилається до пов'язаного із методом об'єкту `duck`. Якщо ім'я об'єкту зміниться на `mallard`, то необхідності шукати усі посилання до назви `duck` у коді не буде. Це кодове слово робить код більш придатним та легшим для читання. +`this` — доволі широка тема, а наведений вище приклад є лише одним зі способів його використання. У даному контексті `this` посилається на пов’язаний із методом об’єкт `duck`. Якщо ім’я об’єкта зміниться на `mallard`, то не доведеться шукати усі посилання на `duck`. Це робить код багаторазовим та легшим для читання. # --instructions-- -Модифікуєте метод `dog.sayLegs`, забравши будь-які посилання до `dog`. Використовуйте приклад об'єкту `duck` для орієнтації. +Змініть метод `dog.sayLegs`, забравши будь-які посилання на `dog`. Використайте приклад `duck` для керівництва. # --hints-- -`dog.sayLegs()` повинен повертати вказаний рядок символів. +`dog.sayLegs()` має повернути наданий рядок. ```js assert(dog.sayLegs() === 'This dog has 4 legs.'); ``` -Код повинен використовувати кодове слово `this` для доступу до властивості `numLegs` об'єкту `dog`. +Код має використати ключове слово `this`, щоб отримати доступ до властивості `numLegs` об’єкта `dog`. ```js assert(code.match(/this\.numLegs/g)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/override-inherited-methods.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/override-inherited-methods.md index dd2210b03c6..73ba69be066 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/override-inherited-methods.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/override-inherited-methods.md @@ -1,6 +1,6 @@ --- id: 587d7db1367417b2b2512b88 -title: Змінити успадковані методи +title: Перевизначення успадкованих методів challengeType: 1 forumTopicId: 301322 dashedName: override-inherited-methods @@ -8,19 +8,19 @@ dashedName: override-inherited-methods # --description-- -У попередніх уроках ви дізналися, що об'єкт може успадковувати поведінку (методи) від іншого об'єкту, посилаючись на його `prototype`: +У попередніх завданнях ви дізналися, що об’єкт може успадковувати поведінку (методи) від іншого об’єкта, посилаючись на його `prototype`: ```js ChildObject.prototype = Object.create(ParentObject.prototype); ``` -Тоді `ChildObject` отримує власні методи завдяки привласненню їх `prototype`: +Тоді `ChildObject` отримує власні методи, приєднавши їх до `prototype`: ```js ChildObject.prototype.methodName = function() {...}; ``` -Успадкований метод можна змінити. Це робиться так само: треба додати метод до `ChildObject.prototype`, використовуючи таку ж саму назву методу, як й у того, що підлягає редагуванню. Ось приклад `Bird` зі змінним `eat()` методом, успадкованим від `Animal`: +Успадкований метод можна змінити. Це робиться так само: треба додати метод до `ChildObject.prototype`, використовуючи таку ж саму назву методу, як й у того, що підлягає редагуванню. Ось приклад `Bird` зі зміненим методом `eat()`, успадкованим від `Animal`: ```js function Animal() { } @@ -36,16 +36,16 @@ Bird.prototype.eat = function() { }; ``` -Якщо у вас є `let duck = new Bird();`, викличте `duck.eat()` — таким чином використовується JavaScript для методу `prototype` ланцюга `duck`: +Якщо ви маєте екземпляр `let duck = new Bird();` та викличете `duck.eat()`, ось так JavaScript шукатиме метод у ланцюгу прототипів `duck`: -1. `duck` => Is `eat()` визначений у цьому випадку? Ні. -2. `Bird` => Is `eat()` визначений у цьому випадку? => Так. Виконайте це й припиніть пошуки. -3. `Animal` => `eat()` також визначено, але JavaScript вже припинив пошук перед цим рівнем. -4. Object => JavaScript припинив пошук до досягнення цього рівня. +1. `duck` => Чи визначено `eat()`? Ні. +2. `Bird` => Чи визначено `eat()`? => Так. Виконайте й припиніть пошуки. +3. `Animal` => Також визначено `eat()`, але JavaScript вже припинив пошуки. +4. Об’єкт => JavaScript припинив пошуки. # --instructions-- -Замінить `fly()` метод для `Penguin` повернення рядку `Alas, this is a flightless bird.` +Перевизначте метод `fly()` для `Penguin`, щоб він повернув рядок `Alas, this is a flightless bird.` # --hints-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/remember-to-set-the-constructor-property-when-changing-the-prototype.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/remember-to-set-the-constructor-property-when-changing-the-prototype.md index baff67d80bd..dfa065816b5 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/remember-to-set-the-constructor-property-when-changing-the-prototype.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/remember-to-set-the-constructor-property-when-changing-the-prototype.md @@ -1,6 +1,6 @@ --- id: 587d7daf367417b2b2512b80 -title: Не забудьте встановити властивості Конструктора під час зміни прототипу +title: Не забудьте налаштувати властивості конструктора під час зміни прототипу challengeType: 1 forumTopicId: 301323 dashedName: remember-to-set-the-constructor-property-when-changing-the-prototype @@ -8,7 +8,7 @@ dashedName: remember-to-set-the-constructor-property-when-changing-the-prototype # --description-- -Існує один важливий побічний ефект ручного встановлення прототипу до нового об'єкту. Це призводить до знищення властивостей `constructor`! Завдяки цій властивості можна дізнатися, яка функція конструктора створила приклад, але це може давати хибні результати, якщо параметр було перезаписано: +Існує один важливий побічний ефект після налаштування прототипу на новий об’єкт вручну. Це призводить до знищення властивості `constructor`! Завдяки цій властивості можна дізнатися, яка функція-конструктор створила екземпляр, але вона була перезаписана, тому надає хибні результати: ```js duck.constructor === Bird; @@ -18,7 +18,7 @@ duck instanceof Bird; Тоді ці вирази будуть оцінюватися таким чином: `false`, `true` й `true`. -Для виправлення, не забудьте власноруч зазначати властивість `constructor` під час встановлення прототипу: +Щоб виправити це, не забудьте власноруч визначити властивість `constructor` під час налаштування прототипу: ```js Bird.prototype = { @@ -35,11 +35,11 @@ Bird.prototype = { # --instructions-- -Визначте властивість `constructor` для `Dog` `prototype`. +Визначте властивість `constructor` для `prototype` `Dog`. # --hints-- -`Dog.prototype` повинен встановлювати властивість `constructor`. +`Dog.prototype` має налаштувати властивість `constructor`. ```js assert(Dog.prototype.constructor === Dog); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property.md index 5daa89593f7..ae24c41980f 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property.md @@ -1,6 +1,6 @@ --- id: 587d7db1367417b2b2512b86 -title: Скинути властивість успадкованого конструктора +title: Скидання властивості успадкованого конструктора challengeType: 1 forumTopicId: 301324 dashedName: reset-an-inherited-constructor-property @@ -8,7 +8,7 @@ dashedName: reset-an-inherited-constructor-property # --description-- -Якщо об'єкт успадковує `prototype` від іншого об'єкту, він також успадковує властивість конструктору супертипу. +Якщо об’єкт успадковує `prototype` від іншого об’єкту, він також успадковує властивість конструктора супертипу. Наприклад: @@ -19,7 +19,7 @@ let duck = new Bird(); duck.constructor ``` -Але `duck` й усі відбитки `Bird` повинні відображати, що вони були відтворені в `Bird`, а не в `Animal`. Для цього ви можете власноруч встановити властивість конструктора `Bird` для `Bird`: +Але `duck` та усі екземпляри `Bird` мають показати, що їх створив `Bird`, а не `Animal`. Для цього ви можете власноруч встановити властивість конструктора `Bird` на об’єкт `Bird`: ```js Bird.prototype.constructor = Bird; @@ -28,29 +28,29 @@ duck.constructor # --instructions-- -Змініть код, щоб `duck.constructor` й `beagle.constructor` повернули їх відповідні конструктори. +Змініть код, щоб `duck.constructor` та `beagle.constructor` повернули відповідні конструктори. # --hints-- -`Bird.prototype` повинен бути частиною `Animal`. +`Bird.prototype` має бути екземпляром `Animal`. ```js assert(Animal.prototype.isPrototypeOf(Bird.prototype)); ``` -`duck.constructor` має повертати `Bird`. +`duck.constructor` має повернути `Bird`. ```js assert(duck.constructor === Bird); ``` -`Dog.prototype` має бути частиною `Animal`. +`Dog.prototype` має бути екземпляром `Animal`. ```js assert(Animal.prototype.isPrototypeOf(Dog.prototype)); ``` -`beagle.constructor` має повертати `Dog`. +`beagle.constructor` має повернути `Dog`. ```js assert(beagle.constructor === Dog); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/set-the-childs-prototype-to-an-instance-of-the-parent.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/set-the-childs-prototype-to-an-instance-of-the-parent.md index d9aa8a2b357..c5a917956cc 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/set-the-childs-prototype-to-an-instance-of-the-parent.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/set-the-childs-prototype-to-an-instance-of-the-parent.md @@ -1,6 +1,6 @@ --- id: 587d7db1367417b2b2512b85 -title: Встановіть дочірній прототип до екземпляру батьківського класу +title: Налаштування прототипу дочірнього елемента на екземпляр батьківського елемента challengeType: 1 forumTopicId: 301325 dashedName: set-the-childs-prototype-to-an-instance-of-the-parent @@ -8,30 +8,30 @@ dashedName: set-the-childs-prototype-to-an-instance-of-the-parent # --description-- -В попередніх завданнях ви дізналися перші кроки до успадкування поведінки від супертипу (або батьківського компонента) `Animal`: створення власного прикладу `Animal`. +У попередньому завданні ви побачили перший крок для успадкування поведінки від супертипу (або батька) `Animal`: створення нового екземпляру `Animal`. -Це завдання присвячено наступному кроку: завдання `prototype` для підтипу: у цьому випадку `Bird` як частини `Animal`. +Це завдання присвячене наступному кроку: налаштуванню `prototype` підтипу (або дочірнього елемента) — у нашому випадку `Bird` — як екземпляр `Animal`. ```js Bird.prototype = Object.create(Animal.prototype); ``` -Пам'ятайте, що `prototype` є своєрідним «рецептом» для створення об'єкта. Таким чином основні «інгредієнти» `Animal` є частиною рецепту `Bird`. +Пам’ятайте, що `prototype` є своєрідним «рецептом» для створення об’єкта. Таким чином ключові «інгредієнти» з `Animal` тепер є частиною рецепту `Bird`. ```js let duck = new Bird("Donald"); duck.eat(); ``` -`duck` успадковує усі властивості `Animal` разом зі методом `eat`. +`duck` успадковує усі властивості `Animal`, включно з методом `eat`. # --instructions-- -Змініть код так, щоб усі частини `Dog` були успадковані від `Animal`. +Змініть код, щоб екземпляри `Dog` успадковували від `Animal`. # --hints-- -`Dog.prototype` має бути частиною `Animal`. +`Dog.prototype` має бути екземпляром `Animal`. ```js assert(Animal.prototype.isPrototypeOf(Dog.prototype)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties.md index d89c7fb53ae..1791caa82bc 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties.md @@ -1,6 +1,6 @@ --- id: 587d7dae367417b2b2512b7b -title: Розуміння власних властивостей +title: Власні властивості challengeType: 1 forumTopicId: 301326 dashedName: understand-own-properties @@ -8,7 +8,7 @@ dashedName: understand-own-properties # --description-- -В наступному прикладі конструктор `Bird` встановлює дві властивості `name` й `numLegs`: +У цьому прикладі конструктор `Bird` визначає властивості `name` та `numLegs`: ```js function Bird(name) { @@ -20,7 +20,7 @@ let duck = new Bird("Donald"); let canary = new Bird("Tweety"); ``` -`name` й `numLegs` називаються own properties, бо вони визначаються напряму від об'єкта. Це означає, що `duck` й `canary` мають власні копії цих властивостей. Насправді кожна частина `Bird` повинна мати власну копію цих властивостей. Цей код надає змогу додати всі власні властивості `duck` до масиву `ownProps`: +`name` та `numLegs` називаються власними властивостями, оскільки їх визначено одразу в екземплярі об’єкта. Це означає, що `duck` та `canary` мають власні копії властивостей. Кожен екземпляр `Bird` матиме власну копію властивостей. Цей код додає всі власні властивості `duck` до масиву `ownProps`: ```js let ownProps = []; @@ -34,7 +34,7 @@ for (let property in duck) { console.log(ownProps); ``` -Консоль повинна зображати значення `["name", "numLegs"]`. +Консоль показуватиме значення `["name", "numLegs"]`. # --instructions-- @@ -42,19 +42,19 @@ console.log(ownProps); # --hints-- -`ownProps` має містити в собі значення `numLegs` й `name`. +`ownProps` має містити значення `numLegs` та `name`. ```js assert(ownProps.indexOf('name') !== -1 && ownProps.indexOf('numLegs') !== -1); ``` -Ви повинні розв'язати це завдання без використання побудови в методі `Object.keys()`. +Виконайте це завдання, не використовуючи вбудований метод `Object.keys()`. ```js assert(!/Object(\.keys|\[(['"`])keys\2\])/.test(code)); ``` -Ви повинні розв'язати це завдання без використання складного кодування `ownProps`. +Виконайте це завдання, не закодовуючи масив `ownProps` жорстко. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-constructor-property.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-constructor-property.md index c6ca32d619c..3c73976e587 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-constructor-property.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-constructor-property.md @@ -1,6 +1,6 @@ --- id: 587d7daf367417b2b2512b7e -title: Розуміння властивостей конструктора +title: Властивість конструктора challengeType: 1 forumTopicId: 301327 dashedName: understand-the-constructor-property @@ -8,7 +8,7 @@ dashedName: understand-the-constructor-property # --description-- -Є особлива властивість `constructor`, що знаходиться в екземплярі об'єкта `duck` і `beagle`, які ми створили у попередніх завданнях: +Існує особлива властивість `constructor`, що знаходиться в екземплярах об’єктів `duck` та `beagle`, які ми створили у попередніх завданнях: ```js let duck = new Bird(); @@ -18,9 +18,9 @@ console.log(duck.constructor === Bird); console.log(beagle.constructor === Dog); ``` -Обидва ці `console.log` виклики відображатимуться `true` у консолі. +Обидва виклики `console.log` виведуть `true` на консолі. -Зверніть увагу, що властивість `constructor` є посиланням на функцію конструктора, що створила екземпляр. Перевага властивостей `constructor` полягає в тому, що можна перевірити цю функцію та визначити, який це об'єкт. Ось приклад того, як це можна використовувати: +Зверніть увагу, що властивість `constructor` є посиланням на функцію-конструктор, яка створила екземпляр. Перевага властивості `constructor` полягає в тому, що цю властивість можна перевірити та визначити, який це об’єкт. Ось приклад того, як це можна використовувати: ```js function joinBirdFraternity(candidate) { @@ -32,27 +32,27 @@ function joinBirdFraternity(candidate) { } ``` -**Примітка:** Через те, що властивості `constructor` можуть бути перезаписані (це буде показано у наступних двох завданнях), загалом, краще використовувати метод `instanceof` для перевірки типу об'єкта. +**Примітка:** оскільки властивість `constructor` можна перевизначити (детальніше у наступних двох завданнях), для перевірки типу об’єкта краще використовувати метод `instanceof`. # --instructions-- -Напишіть функцію `joinDogFraternity`, яка приймає параметр `candidate` та, використовуючи властивість `constructor`, перетворюється на `true`, за умови, що кандидат - це `Dog`, в іншому випадку - на `false`. +Напишіть функцію `joinDogFraternity`, яка приймає параметр `candidate` та, використовуючи властивість `constructor`, поверніть `true`, якщо кандидатом є `Dog`, в іншому випадку поверніть `false`. # --hints-- -`joinDogFraternity` має бути визначено як функція. +`joinDogFraternity` потрібно визначити як функцію. ```js assert(typeof joinDogFraternity === 'function'); ``` -`joinDogFraternity` має перетворюватись на `true`, якщо `candidate` є екземпляром `Dog`. +`joinDogFraternity` має повернути `true`, якщо `candidate` є екземпляром `Dog`. ```js assert(joinDogFraternity(new Dog('')) === true); ``` -`joinDogFraternity` повинно використовувати властивість `constructor`. +`joinDogFraternity` має використовувати властивість `constructor`. ```js assert(/\.constructor/.test(code) && !/instanceof/.test(code)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-immediately-invoked-function-expression-iife.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-immediately-invoked-function-expression-iife.md index 6051e6bdf62..812b8760672 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-immediately-invoked-function-expression-iife.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-immediately-invoked-function-expression-iife.md @@ -1,6 +1,6 @@ --- id: 587d7db2367417b2b2512b8b -title: Пояснення негайно викликаного виразу функції (IIFE) +title: Вираз негайно викликаної функції (IIFE) challengeType: 1 forumTopicId: 301328 dashedName: understand-the-immediately-invoked-function-expression-iife @@ -8,7 +8,7 @@ dashedName: understand-the-immediately-invoked-function-expression-iife # --description-- -Найрозповсюдженіший шаблон в JavaScript — це виконання функції одразу після її оголошення: +Часто у JavaScript виконують функцію одразу після її оголошення: ```js (function () { @@ -16,13 +16,13 @@ dashedName: understand-the-immediately-invoked-function-expression-iife })(); ``` -Цей анонімний вираз функції негайно відображає або виконує `Chirp, chirp!`. +Це анонімний вираз функції, яка одразу виконується та виводить `Chirp, chirp!`. -Зверніть увагу, що функція безіменна й не зберігається у змінній. Дві дужки () наприкінці виразу сприяють негайному виконанню або виклику. Цей шаблон також відомий як immediately invoked function expression або IIFE. +Зверніть увагу, що функція не має назви та не зберігається у змінній. Дві дужки () наприкінці виразу сприяють негайному виконанню або виклику. Це відомо як вираз негайно викликаної функції або IIFE. # --instructions-- -Перепишіть функцію `makeNest` й приберіть назву, щоб замість цього одразу одержати анонімний негайно викликаний вираз функції (IIFE). +Перепишіть функцію `makeNest` та видаліть виклик, щоб це був анонімний вираз негайно викликаної функції (IIFE). # --hints-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-prototype-chain.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-prototype-chain.md index 8a1f67f473a..8c12acec3af 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-prototype-chain.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-prototype-chain.md @@ -1,6 +1,6 @@ --- id: 587d7db0367417b2b2512b82 -title: Зрозумійте використання ланцюга прототипів +title: Ланцюг прототипів challengeType: 1 forumTopicId: 301329 dashedName: understand-the-prototype-chain @@ -8,7 +8,7 @@ dashedName: understand-the-prototype-chain # --description-- -Усі об'єкти JavaScript (за невеликими винятками) мають `prototype`. Також сам `prototype` є об'єктом. +Усі об’єкти в JavaScript (за парою винятків) мають `prototype`. До того ж сам прототип об’єкта є об’єктом. ```js function Bird(name) { @@ -18,28 +18,28 @@ function Bird(name) { typeof Bird.prototype; ``` -Тому що `prototype` — це об'єкт, `prototype` може мати свій `prototype`! Таким чином `prototype` `Bird.prototype` це `Object.prototype`: +Оскільки `prototype` є об’єктом, `prototype` може мати власний `prototype`! У цьому випадку `prototype` `Bird.prototype` є `Object.prototype`: ```js Object.prototype.isPrototypeOf(Bird.prototype); ``` -Чим це корисно? Ви можете викликати `hasOwnProperty` метод із попереднього завдання: +Чим це корисно? Згадайте метод `hasOwnProperty` із попереднього завдання: ```js let duck = new Bird("Donald"); duck.hasOwnProperty("name"); ``` -Метод `hasOwnProperty` визначається `Object.prototype` й може бути доступним для `Bird.prototype`, що так само може бути доступним для `duck`. Це приклад ланцюга `prototype`. У цьому `prototype` ланцюга, `Bird` є `supertype` для `duck`, доки `duck` це `subtype`. `Object` це `supertype` водночас для `Bird` й `duck`. `Object` це `supertype` для усіх об'єктів JavaScript. Внаслідок цього будь-який об'єкт може використовувати метод `hasOwnProperty`. +Метод `hasOwnProperty` визначений в `Object.prototype`, до якого можна отримати доступ завдяки `Bird.prototype`, до якого можна отримати доступ завдяки `duck`. Це приклад ланцюга прототипів. `Bird` у цьому ланцюзі прототипів є супертипом для `duck`, а `duck` є підтипом. `Object` є супертипом для `Bird` та `duck`. `Object` є супертипом для всіх об’єктів у JavaScript. Отже, будь-який об’єкт може використовувати метод `hasOwnProperty`. # --instructions-- -Змініть код для демонстрації правильного ланцюжка прототипів. +Змініть код, щоб показувати правильний ланцюг прототипів. # --hints-- -Ваш код має відбивати, що `Object.prototype` є прототипом для `Dog.prototype` +Код має показувати, що `Object.prototype` є прототипом `Dog.prototype` ```js assert(/Object\.prototype\.isPrototypeOf/.test(code)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-where-an-objects-prototype-comes-from.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-where-an-objects-prototype-comes-from.md index 8f6544333d2..af779edcfd9 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-where-an-objects-prototype-comes-from.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-where-an-objects-prototype-comes-from.md @@ -1,6 +1,6 @@ --- id: 587d7db0367417b2b2512b81 -title: Розуміння того, звідки з'являється прототип об'єкта +title: Звідки з’являється прототип об’єкта challengeType: 1 forumTopicId: 301330 dashedName: understand-where-an-objects-prototype-comes-from @@ -8,7 +8,7 @@ dashedName: understand-where-an-objects-prototype-comes-from # --description-- -Так само, як люди успадковують гени від своїх батьків, об'єкт успадковує його `prototype` безпосередньо від функції конструктора, яка його створила. Наприклад, `Bird`конструктор створює об'єкт `duck`: +Люди успадковують гени від своїх батьків, а об’єкт успадковує `prototype` від функції-конструктора, яка його створила. Наприклад, конструктор `Bird` створює об’єкт `duck`: ```js function Bird(name) { @@ -18,21 +18,21 @@ function Bird(name) { let duck = new Bird("Donald"); ``` -`duck` наслідує `prototype` з функції конструктора `Bird`. Ви можете показати це відношення з методом `isPrototypeOf`: +`duck` успадковує `prototype` від функції-конструктора `Bird`. Такі зв’язки можна показати за допомогою методу `isPrototypeOf`: ```js Bird.prototype.isPrototypeOf(duck); ``` -Вони повернуть `true`. +Повернеться `true`. # --instructions-- -Використовуйте `isPrototypeOf` щоб перевірити `prototyp` of `beagle`. +Використайте `isPrototypeOf`, щоб перевірити `beagle` `prototype`. # --hints-- -Ви повинні показати, що `Dog.prototype` це є `prototype` `beagle` +Ви повинні показати, що `Dog.prototype` є прототипом `beagle` ```js assert(/Dog\.prototype\.isPrototypeOf\(beagle\)/.test(code)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-constructor-to-create-objects.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-constructor-to-create-objects.md index 63b0a6efc49..f4417086c15 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-constructor-to-create-objects.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-constructor-to-create-objects.md @@ -1,6 +1,6 @@ --- id: 587d7dad367417b2b2512b78 -title: Використання конструктора для створення об'єктів +title: Використання конструктора для створення об’єктів challengeType: 1 forumTopicId: 18233 dashedName: use-a-constructor-to-create-objects @@ -20,9 +20,9 @@ function Bird() { let blueBird = new Bird(); ``` -**ПРИМІТКА:** вcередині конструктора `this` завжди посилається до створеного об'єкта. +**ПРИМІТКА:** `this` вcередині конструктора завжди посилається на створений об’єкт. -Зауважте, що для виклику конструктора використовується інструкція `new`. Так JavaScript отримує команду створити новий екземпляр `Bird` під назвою `blueBird`. Без інструкції `new`, `this` всередині конструктора не посилатиметься но новоствореного об'єкту, що може привести до неочікуваних результатів. `blueBird` має усі властивості визначені всередині конструктора `Bird`: +Зауважте, що для виклику конструктора використовують оператор `new`. Так JavaScript отримує команду створити новий екземпляр `Bird` під назвою `blueBird`. Без оператора `new`, `this` всередині конструктора не посилатиметься на новостворений об’єкт, що може привести до неочікуваних результатів. Тепер `blueBird` має усі властивості, визначені всередині конструктора `Bird`: ```js blueBird.name; @@ -30,7 +30,7 @@ blueBird.color; blueBird.numLegs; ``` -Так само, як і будь-який інший об'єкт, його властивості можуть бути доступні і змінені: +Як і будь-який інший об’єкт, його властивості можуть бути доступні і змінені: ```js blueBird.name = 'Elvira'; @@ -39,17 +39,17 @@ blueBird.name; # --instructions-- -Використайте конструктор `Dog` із попереднього завдання для створення нового екземпляру `Dog`, визначаючи його змінною `hound`. +Використайте конструктор `Dog` із попереднього завдання, щоб створити новий екземпляр `Dog`, призначивши його до змінної `hound`. # --hints-- -`hound` повинен бути створений за допомогою конструктора `Dog`. +Створіть `hound` за допомогою конструктора `Dog`. ```js assert(hound instanceof Dog); ``` -Код повинен використовувати інструкцію `new` для створення нового екземпляру `Dog`. +Код має використати оператор `new`, щоб створити екземпляр `Dog`. ```js assert(code.match(/new/g)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-mixin-to-add-common-behavior-between-unrelated-objects.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-mixin-to-add-common-behavior-between-unrelated-objects.md index 8559c5d229c..f2c2c7e0476 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-mixin-to-add-common-behavior-between-unrelated-objects.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-mixin-to-add-common-behavior-between-unrelated-objects.md @@ -1,6 +1,6 @@ --- id: 587d7db2367417b2b2512b89 -title: Використайте Mixin для встановлення спільної поведінки між непов'язаними об'єктами +title: Міксини, щоб налаштувати спільну поведінку між непов’язаними об’єктами challengeType: 1 forumTopicId: 301331 dashedName: use-a-mixin-to-add-common-behavior-between-unrelated-objects @@ -8,9 +8,9 @@ dashedName: use-a-mixin-to-add-common-behavior-between-unrelated-objects # --description-- -Як ви помітили, поведінка розділюється внаслідок успадкування. Однак є випадки, коли успадкування не є найкращим рішенням. Успадкування не працює у випадку зі непов'язаними об'єктами, наприклад, як `Bird` й `Airplane`. Вони обидві здатні літати, але `Bird` не належить до типу `Airplane` і навпаки. +Як ви помітили, поведінка розділяється внаслідок успадкування. Однак є випадки, коли успадкування не є найкращим рішенням. Успадкування не працює належним чином з непов’язаними об’єктами (наприклад, `Bird` та `Airplane`). Вони обидві здатні літати, але `Bird` не належить до типу `Airplane` і навпаки. -Для непов'язаних об'єктів краще використовувати mixins. Завдяки mixin об'єкти здатні використовувати набір функцій. +Для непов’язаних об’єктів краще використовувати міксини. Міксини дозволяють об’єктам використовувати набір функцій. ```js let flyMixin = function(obj) { @@ -20,7 +20,7 @@ let flyMixin = function(obj) { }; ``` -`flyMixin` обирає один об'єкт й привласнює йому метод `fly`. +`flyMixin` приймає будь-який об’єкт та надає йому метод `fly`. ```js let bird = { @@ -37,36 +37,36 @@ flyMixin(bird); flyMixin(plane); ``` -Таким чином `bird` й `plane` привласнені `flyMixin`, що присвоює функції `fly` для кожного об'єкта. Наразі й `bird`, й `plane` можуть літати: +У прикладі `bird` та `plane` передані до `flyMixin`, що потім присвоює функцію `fly` до кожного об’єкта. Тепер `bird` та `plane` можуть літати: ```js bird.fly(); plane.fly(); ``` -Консоль буде показувати рядок `Flying, wooosh!` двічі для кожного `.fly()` виклику. +Консоль виведе рядок `Flying, wooosh!` для кожного виклику `.fly()`. -Зверніть увагу, що `fly` метод може бути використано повторно непов'язаними об'єктами `bird` й `plane`. +Зверніть увагу, як міксин дозволяє непов’язаним об’єктам `bird` та `plane` використовувати метод `fly` повторно. # --instructions-- -Створіть mixin під назвою `glideMixin`, що визначає метод під назвою `glide`. Після цього використайте `glideMixin`, щоб водночас надати `bird` й `boat` можливість поступового переходу. +Створіть міксин під назвою `glideMixin`, який визначає метод під назвою `glide`. Потім використайте `glideMixin`, щоб надати `bird` та `boat` можливість плавно рухатись. # --hints-- -Ваш код має задати змінну `glideMixin` як функцію. +Код має оголосити змінну `glideMixin`, яка є функцією. ```js assert(typeof glideMixin === 'function'); ``` -Завдяки використаному у вашому коді `glideMixin` в об'єкті `bird`, ви можете завдати метод `glide`. +Код має використати `glideMixin` на об’єкті `bird`, щоб надати йому метод `glide`. ```js assert(typeof bird.glide === 'function'); ``` -Ваш код повинен містить в собі `glideMixin` в об'єкті `boat` для завдання методу `glide`. +Код має використати `glideMixin` на об’єкті `boat`, щоб надати йому метод `glide`. ```js assert(typeof boat.glide === 'function'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-an-iife-to-create-a-module.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-an-iife-to-create-a-module.md index 051a5f2f996..70e79004bd8 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-an-iife-to-create-a-module.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-an-iife-to-create-a-module.md @@ -1,6 +1,6 @@ --- id: 587d7db2367417b2b2512b8c -title: Використовуйте IIFE щоб створити модуль +title: IIFE для створення модуля challengeType: 1 forumTopicId: 301332 dashedName: use-an-iife-to-create-a-module @@ -8,7 +8,7 @@ dashedName: use-an-iife-to-create-a-module # --description-- -Вираз функції (IIFE), який негайно викликається, часто використовується для об'єднання зв'язаних функцій в один об'єкт чи module. Наприклад, попередній виклик визначив два міксини: +Вираз негайно викликаної функції (IIFE) часто використовують, щоб згрупувати пов’язану функціональність в один об’єкт або модуль. Наприклад, попереднє завдання визначило два міксини: ```js function glideMixin(obj) { @@ -23,7 +23,7 @@ function flyMixin(obj) { } ``` -Ми можемо згрупувати ці міксини в модуль наступний чином: +Ми можемо згрупувати ці міксини в модуль: ```js let motionModule = (function () { @@ -42,7 +42,7 @@ let motionModule = (function () { })(); ``` -Зверніть увагу, що у вас є вираз функції (IIFE), який негайно викликається та повертає об'єкт `motionModule`. Цей об'єкт, що повертається, містить всі змішані види поведінки як властивості об'єкта. Перевага моделі модуля полягає в тому, що всі моделі поведінки руху можуть бути упаковані в один об'єкт, який потім можуть використовувати інші частини вашого коду. Ось приклад, як це використовувати: +Зверніть увагу, що ви маєте вираз негайно викликаної функції (IIFE), який повертає об’єкт `motionModule`. Повернений об’єкт містить поведінку міксинів як властивості об’єкта. Перевага модуля в тому, що поведінку руху можна розмістити в одному об’єкті, який потім можуть використовувати інші частини коду. Ось приклад використання: ```js motionModule.glideMixin(duck); @@ -51,11 +51,11 @@ duck.glide(); # --instructions-- -Створіть модуль з назвою `funModule` для обгортки двох змішувань `isCuteMixin` та `singMixin`. `funModule` повинен повернути об'єкт. +Створіть модуль під назвою `funModule`, щоб загорнути два міксини (`isCuteMixin` та `singMixin`). `funModule` має повернути об’єкт. # --hints-- -`funModule` повинен визначити та повернути об'єкт. +`funModule` має бути визначеним та повернути об’єкт. ```js assert(typeof funModule === 'object'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-closure-to-protect-properties-within-an-object-from-being-modified-externally.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-closure-to-protect-properties-within-an-object-from-being-modified-externally.md index c6f20eeb4cc..2b2f16cdb82 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-closure-to-protect-properties-within-an-object-from-being-modified-externally.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-closure-to-protect-properties-within-an-object-from-being-modified-externally.md @@ -1,7 +1,7 @@ --- id: 587d7db2367417b2b2512b8a title: >- - Використовуйте closure для захисту властивостей об’єкта від зовнішньої модифікації + Замикання, щоб захистити властивості об’єкта від зовнішніх змін challengeType: 1 forumTopicId: 18234 dashedName: >- @@ -10,15 +10,15 @@ dashedName: >- # --description-- -У попередньому виклику `bird` мав загальнодоступну властивість `name`. Він вважається загальнодоступним, оскільки до нього можна отримати доступ та змінити його за межами визначення `bird`. +`bird` у попередньому завданні мав публічну властивість `name`. Вона вважається публічною, оскільки до неї можна отримати доступ та змінити за межами визначення `bird`. ```js bird.name = "Duffy"; ``` -Тому будь -яка частина вашого коду може легко змінити назву `bird` на будь -яке значення. Подумайте про такі речі, як паролі та банківські рахунки, які легко змінюються будь -якою частиною вашої кодової бази. Це може спричинити багато проблем. +Тому будь-яка частина коду може легко змінити назву `bird` на будь-яке значення. Подумайте про паролі та банківські рахунки, які можна легко змінити будь-якою частиною кодової бази. Це може спричинити багато проблем. -Найпростіший спосіб зробити цю загальнодоступну властивість приватною - це створити змінну всередині функції конструктора. Це змінює масштаб цієї змінної в межах функції конструктора в порівнянні з наявними в глобальних масштабах. Таким чином, змінна може бути доступна і змінена за допомогою методів також в межах функції конструктора. +Найпростіший спосіб зробити публічну властивість приватною — створити змінну всередині функції конструктора. Це змінить область видимості цієї змінної, щоб вона була областю функції конструктора, а не доступною глобально. Таким чином до змінної можна отримати доступ та змінити за допомогою методів в межах функції конструктора. ```js function Bird() { @@ -32,11 +32,11 @@ let ducky = new Bird(); ducky.getHatchedEggCount(); ``` -`getHatchedEggCount` є привілейованим методом, оскільки він має доступ до приватної змінної `hatchedEgg`. Це можливо, тому що `hatchedEgg` оголошено в тому ж контексті, що і `getHatchedEggCount`. У JavaScript функція завжди має доступ до контексту, в якому вона була створена. Це називається `closure`. +`getHatchedEggCount` є привілейованим методом, оскільки він має доступ до приватної змінної `hatchedEgg`. Причина в тому, що `hatchedEgg` оголошена в тому ж контексті, що й `getHatchedEggCount`. У JavaScript функція завжди має доступ до контексту, в якому вона була створена. Це називається замиканням (`closure`). # --instructions-- -Змініть спосіб `weight` так як зазначається у функції `Bird`, щоб вона стала приватною змінною. Потім створіть метод `getWeight`, який поверне значення `weight` 15. +Змініть оголошення `weight` у функції `Bird`, щоб вона стала приватною змінною. Потім створіть метод `getWeight`, який поверне значення `weight` 15. # --hints-- @@ -46,13 +46,13 @@ ducky.getHatchedEggCount(); assert(code.match(/(var|let|const)\s+weight\s*\=\s*15\;?/g)); ``` -Ваш код повинен створити метод у `Bird` під назвою `getWeight`, який повертає значення приватної змінної `weight`. +Код має створити метод у `Bird` під назвою `getWeight`, який повертає значення приватної змінної `weight`. ```js assert(new Bird().getWeight() === 15); ``` -Ваша функція `getWeight` повинна повернути приватну змінну `weight`. +Функція `getWeight` має повернути приватну змінну `weight`. ```js assert(code.match(/((return\s+)|(\(\s*\)\s*\=\>\s*))weight\;?/g)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object.md index 86586a7b705..467ba2abe3c 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object.md +++ b/curriculum/challenges/ukrainian/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: Крапкова нотація для доступу до властивостей об'єкту +title: Точкова нотація, щоб отримати доступ до властивостей об’єкта 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-- -У попередньому завданні було створено об'єкт із різними властивостями. Тепер ви побачите як отримати доступ до значень цих властивостей. Ось приклад: +У попередньому завданні було створено об’єкт із різними властивостями. Тепер ви побачите як отримати доступ до значень цих властивостей. Ось приклад: ```js let duck = { @@ -18,21 +18,21 @@ let duck = { console.log(duck.name); ``` -Для доступу до значення `Aflac`, використовується крапкова нотація при імені об'єкта `duck` із відповідним іменем властивості `name` опісля. +Щоб отримати доступ до значення `Aflac` використали точкову нотацію на імені об’єкта `duck`, після якого йде назва властивості `name`. # --instructions-- -Виведіть на екран обидві властивості об'єкта `dog`. +Виведіть обидві властивості об’єкта `dog` на консоль. # --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/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-inheritance-so-you-dont-repeat-yourself.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-inheritance-so-you-dont-repeat-yourself.md index 6fcfb0bff8b..30a519806de 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-inheritance-so-you-dont-repeat-yourself.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-inheritance-so-you-dont-repeat-yourself.md @@ -1,6 +1,6 @@ --- id: 587d7db0367417b2b2512b83 -title: Використовуйте успадкування, щоб не повторюватися +title: Успадкування, щоб не повторюватися 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`: +Метод `describe` повторюється у двох місцях. Код можна редагувати відповідно до принципу DRY, створивши `supertype` (або батьківський елемент) під назвою `Animal`: ```js function Animal() { }; @@ -41,7 +41,7 @@ Animal.prototype = { }; ``` -Оскільки `Animal` містить `describe` метод, ви можете видалити його з `Bird` і `Dog`: +Оскільки `Animal` містить метод `describe`, його можна видалити з `Bird` та `Dog`: ```js Bird.prototype = { @@ -55,7 +55,7 @@ Dog.prototype = { # --instructions-- -Метод `eat` повторюється як у `Cat`, так і `Bear`. Відредагуйте код за принципом DRY, перемістивши метод `eat` до `supertype` `Animal`. +Метод `eat` повторюється як у `Cat`, так і `Bear`. Відредагуйте код за принципом DRY, перемістивши метод `eat` до `Animal` `supertype`. # --hints-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md index 87d6a5a0921..101640555a9 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md @@ -1,6 +1,6 @@ --- id: 587d7dae367417b2b2512b7c -title: Використання властивостей прототипу для зменшення дублювання коду +title: Властивості прототипу, щоб зменшити дублювання коду challengeType: 1 forumTopicId: 301336 dashedName: use-prototype-properties-to-reduce-duplicate-code @@ -8,32 +8,32 @@ dashedName: use-prototype-properties-to-reduce-duplicate-code # --description-- -Оскільки `numLegs`, ймовірно, матиме однакове значення для всіх екземплярів `Bird`у вас по суті є дубльована змінна`numLegs` всередині кожного `Bird`. +Оскільки `numLegs`, ймовірно, матиме однакове значення для всіх екземплярів `Bird`, у вас по суті є дубльована змінна `numLegs` всередині кожного екземпляра `Bird`. -Це не може бути проблемою, коли існує тільки два випадки, але уявіть собі, якщо є мільйони екземплярів. Буде багато дублюючих змінних. +Це не може бути проблемою, коли існує тільки два випадки, але уявіть собі, якщо є мільйони екземплярів. Буде багато дубльованих змінних. -Кращий спосіб - використовувати `prototype` `Bird`. Особливості в `prototype` є загальними для всіх примірників`Bird`. Наприклад можна ось так додати `numLegs` до `Bird prototype`: +Краще використати `Bird` `prototype`. Властивості в `prototype` є загальними для ВСІХ екземплярів `Bird`. Ось так можна додати `numLegs` до `Bird prototype`: ```js Bird.prototype.numLegs = 2; ``` -Тепер всі випадки`Bird` мають властивість `numLegs`. +Тепер всі екземпляри `Bird` мають властивість `numLegs`. ```js console.log(duck.numLegs); console.log(canary.numLegs); ``` -Оскільки всі екземпляри автоматично мають властивості `prototype`, подумайти про `prototype` як "рецепт" для створення об'єктів. Зверніть увагу, що`prototype` `duck` і `canary` є частиною конструктора `Bird` як `Bird.prototype`. +Оскільки всі екземпляри автоматично мають властивості `prototype`, вважайте `prototype` «рецептом» для створення об’єктів. Зверніть увагу, що `duck` та `canary` `prototype` є частиною конструктора `Bird` як `Bird.prototype`. # --instructions-- -Додати `numLegs` властивість `prototype` з `Dog` +Додайте властивість `numLegs` до `Dog` `prototype` # --hints-- -`beagle` повинен мати властивість `numLegs` визначену числом. +`beagle` повинен мати властивість `numLegs`. ```js assert(beagle.numLegs !== undefined); @@ -45,7 +45,7 @@ assert(beagle.numLegs !== undefined); assert(typeof beagle.numLegs === 'number'); ``` -`numLegs` має мати властивість `prototype` а не власну властивість. +`numLegs` повинна бути властивістю `prototype`, а не власною властивістю. ```js assert(beagle.hasOwnProperty('numLegs') === false); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/verify-an-objects-constructor-with-instanceof.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/verify-an-objects-constructor-with-instanceof.md index 80b250df57d..880d20cc11a 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/verify-an-objects-constructor-with-instanceof.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/verify-an-objects-constructor-with-instanceof.md @@ -1,6 +1,6 @@ --- id: 587d7dae367417b2b2512b7a -title: Перевірка конструктора об'єкта за допомогою instanceof +title: Перевірка конструктора об’єкта за допомогою instanceof challengeType: 1 forumTopicId: 301337 dashedName: verify-an-objects-constructor-with-instanceof @@ -8,7 +8,7 @@ dashedName: verify-an-objects-constructor-with-instanceof # --description-- -Щоразу, коли конструктор функцій створює новий об'єкт, він стає instance для його конструктора. JavaScript є найзручнішим засобом підтвердження оператору `instanceof`. `instanceof` надає змогу порівняти об'єкт із конструктором, повернути `true` або `false` залежно від того, чи був об'єкт створений за допомогою конструктору. Наприклад: +Щоразу, коли функція-конструктор створює новий об’єкт, він стає екземпляром конструктора. JavaScript надає зручний спосіб підтвердження за допомогою оператора `instanceof`. `instanceof` дозволяє порівняти об’єкт з конструктором та повернути `true` або `false` залежно від того, чи був об’єкт створений за допомогою конструктора. Наприклад: ```js let Bird = function(name, color) { @@ -22,9 +22,9 @@ let crow = new Bird("Alexis", "black"); crow instanceof Bird; ``` -Цей метод — `instanceof` — має повернути `true`. +Цей метод `instanceof` поверне `true`. -Якщо об'єкт створено без використання конструктору, `instanceof` підтвердить це: +Якщо об’єкт створено без використання конструктора, `instanceof` підтвердить, що об’єкт не є екземпляром цього конструктора: ```js let canary = { @@ -36,21 +36,21 @@ let canary = { canary instanceof Bird; ``` -Цей метод — `instanceof` — має повернути `false`. +Цей метод `instanceof` поверне `false`. # --instructions-- -Створіть нову частину конструктору `House`, викличте її `myHouse` й передайте кількість спалень. Потім використайте `instanceof`, щоб підтвердити, що це є частиною `House`. +Створіть новий екземпляр конструктора `House`, назвавши його `myHouse` та передавши кількість спалень. Потім використайте `instanceof`, щоб підтвердити, що це екземпляр `House`. # --hints-- -`myHouse` має мати атрибути `numBedrooms`, виражені числом. +`myHouse` повинен мати атрибут `numBedrooms` зі значенням числа. ```js assert(typeof myHouse.numBedrooms === 'number'); ``` -Ви повинні перевірити, що `myHouse` є частиною `House`, за допомогою оператора `instanceof`. +Ви повинні перевірити, що `myHouse` є екземпляром `House`, використавши оператор `instanceof`. ```js assert(/myHouse\s*instanceof\s*House/.test(code)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/check-for-all-or-none.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/check-for-all-or-none.md index 173489b295e..ec62638d723 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/check-for-all-or-none.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/check-for-all-or-none.md @@ -1,6 +1,6 @@ --- id: 587d7dba367417b2b2512ba8 -title: Перевірка на все або нічого +title: Пошук можливого символа challengeType: 1 forumTopicId: 301338 dashedName: check-for-all-or-none @@ -8,11 +8,11 @@ dashedName: check-for-all-or-none # --description-- -Іноді шаблони, які ви хочете знайте, можуть мати частини, які можуть або існувати або ні. Однак може бути важливо все-таки перевірити їх. +Іноді у потрібних вам шаблонах можуть бути частини, які, можливо, не існують. Однак їх всеодно важливо пошукати. -Ви можете вказати можливу наявність елемента за допомогою знаку питання, `?`. Таким чином ви зможете перевірити відсутність або наявність одного з попередніх елементів. Вважайте, що цей символ вказує на те, що попередній елемент необов'язковий. +Ви можете вказати можливу наявність елемента знаком запитання `?`. Таким чином ви зможете перевірити наявність попереднього елемента. Вважайте, що цей символ вказує на те, що елемент перед ним необов’язковий. -Наприклад, в американській та британській англійській мові є незначні відмінності правопису, і ви можете скористатися знаком питання, щоб відповідати обом системам орфографії. +Наприклад, в американській та британській англійській мові є незначні відмінності правопису, і ви можете скористатися знаком запитання, щоб відповідати обом системам написання. ```js let american = "color"; @@ -22,15 +22,15 @@ rainbowRegex.test(american); rainbowRegex.test(british); ``` -У результаті використання обох методів `test` ви отримаєте `true`. +Обидва виклики методу `test` повернуть `true`. # --instructions-- -Змініть регулярний вираз `favRegex` так, аби він відповідав американському (`favorite`) та британському (`favourite`) варіанту написання слова. +Змініть регулярний вираз `favRegex`, щоб він збігався з американською (`favorite`) та британською (`favourite`) версіями слова. # --hints-- -Ваш регулярний вираз повинен використовувати необов'язковий символ `?`. +Ваш регулярний вираз має використати необов’язковий символ `?`. ```js favRegex.lastIndex = 0; diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/check-for-mixed-grouping-of-characters.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/check-for-mixed-grouping-of-characters.md index e3dce1b3584..c8b403d9b81 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/check-for-mixed-grouping-of-characters.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/check-for-mixed-grouping-of-characters.md @@ -1,6 +1,6 @@ --- id: 5c3dda8b4d8df89bea71600f -title: Перевірка на наявність змішаного групування символів +title: Пошук змішаних груп символів challengeType: 1 forumTopicId: 301339 dashedName: check-for-mixed-grouping-of-characters @@ -8,9 +8,9 @@ dashedName: check-for-mixed-grouping-of-characters # --description-- -Іноді ми хочемо перевірити групи символів за допомогою регулярного виразу, і, щоб зробити це, ми використовуємо дужки `()`. +Іноді потрібно перевірити групи символів за допомогою регулярного виразу. Для цього використовують дужки `()`. -Якщо ви хочете знайти `Penguin` або `Pumpkin` в рядку, ви можете використовувати цей регулярний вираз: `/P(engu|umpk)in/g` +Якщо ви хочете знайти `Penguin` або `Pumpkin` в рядку, використайте регулярний вираз `/P(engu|umpk)in/g`. Після цього перевірте, чи бажані групи рядків знаходяться в тестовому рядку за допомогою методу `test()`. @@ -20,65 +20,65 @@ let testRegex = /P(engu|umpk)in/; testRegex.test(testStr); ``` -У результаті використання методу `test` ви отримаєте `true`. +Метод `test` поверне `true`. # --instructions-- -Виправте регулярний вираз таким чином, аби він перевіряв імена `Franklin Roosevelt` або `Eleanor Roosevelt` з урахуванням регістру, і щоб він також враховував середні імена. +Виправте регулярний вираз, щоб він перевірив імена `Franklin Roosevelt` або `Eleanor Roosevelt` з урахуванням регістру та уступив середнім іменам. -Після цього виправте код таким чином, щоб створений вами регулярний вираз перевірявся на `myString` і ви отримали `true` або `false` залежно від того, чи збігається регулярний вираз. +Після цього виправте код, щоб створений вами регулярний вираз перевірявся з `myString` і поверталось `true` або `false` залежно від того, чи збігається регулярний вираз. # --hints-- -Ви маєте отримати `true` для рядка `Franklin D. Roosevelt` за допомогою вашого регулярного виразу `myRegex` +Регулярний вираз `myRegex` має повернути `true` для рядка `Franklin D. Roosevelt` ```js myRegex.lastIndex = 0; assert(myRegex.test('Franklin D. Roosevelt')); ``` -Ви маєте отримати `true` для рядка `Eleanor Roosevelt` за допомогою вашого регулярного виразу `myRegex` +Регулярний вираз `myRegex` має повернути `true` для рядка `Eleanor Roosevelt` ```js myRegex.lastIndex = 0; assert(myRegex.test('Eleanor Roosevelt')); ``` -Ви маєте отримати `false` для рядка `Franklin Rosevelt` за допомогою вашого регулярного виразу `myRegex` +Регулярний вираз `myRegex` має повернути `false` для рядка `Franklin Rosevelt` ```js myRegex.lastIndex = 0; assert(!myRegex.test('Franklin Rosevelt')); ``` -Ви маєте отримати `false` для рядка `Frank Roosevelt` за допомогою вашого регулярного виразу `myRegex` +Регулярний вираз `myRegex` має повернути `false` для рядка `Frank Roosevelt` ```js myRegex.lastIndex = 0; assert(!myRegex.test('Frank Roosevelt')); ``` -Your regex `myRegex` should return `false` for the string `FranklinRoosevelt` +Регулярний вираз `myRegex` має повернути `false` для рядка `FranklinRoosevelt` ```js myRegex.lastIndex = 0; assert(!myRegex.test('FranklinRoosevelt')); ``` -Your regex `myRegex` should return `false` for the string `EleanorRoosevelt` +Регулярний вираз `myRegex` має повернути `false` для рядка `EleanorRoosevelt` ```js myRegex.lastIndex = 0; assert(!myRegex.test('EleanorRoosevelt')); ``` -You should use `.test()` to test the regex. +Використайте `.test()`, щоб протестувати регулярний вираз. ```js assert(code.match(/myRegex.test\(\s*myString\s*\)/)); ``` -У результаті ви повинні отримати `true`. +Результат має повернути `true`. ```js assert(result === true); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/extract-matches.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/extract-matches.md index 9f8715e0e0c..0e882fcdfc5 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/extract-matches.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/extract-matches.md @@ -8,9 +8,9 @@ dashedName: extract-matches # --description-- -До цього ви лише перевіряли, чи існує шаблон у межах рядка. Ви також можете вилучати самі збіги, які ви знайшли, за допомогою методу `.match()`. +Наразі ви лише перевіряли, чи існує шаблон у межах рядка. Ви можете вилучати знайдені збіги за допомогою методу `.match()`. -Щоб використати метод `.match()`, застосуйте його в рядку та подайте регулярний вираз всередині дужок. +Щоб використати метод `.match()`, застосуйте його до рядка та передайте регулярний вираз всередині дужок. Ось приклад: @@ -21,9 +21,9 @@ let ourRegex = /expressions/; ourStr.match(ourRegex); ``` -У цьому випадку перший збіг (`match`) видасть `["Hello"]`, а другий - `["expressions"]`. +У цьому випадку перший збіг (`match`) поверне `["Hello"]`, а другий — `["expressions"]`. -Зверніть увагу, що синтаксис `.match` є "протилежним" до методу `.test`, яким ви користувались дотепер: +Зверніть увагу, що синтаксис `.match` є протилежним до методу `.test`, яким ви користувались дотепер: ```js 'string'.match(/regex/); @@ -48,7 +48,7 @@ assert(result.join() === 'coding'); assert(codingRegex.source === 'coding'); ``` -Ви повинні використовувати метод `.match()`. +Використайте метод `.match()`. ```js assert(code.match(/\.match\(.*\)/)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/find-characters-with-lazy-matching.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/find-characters-with-lazy-matching.md index bbcd1421307..8d2034c6f3c 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/find-characters-with-lazy-matching.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/find-characters-with-lazy-matching.md @@ -1,6 +1,6 @@ --- id: 587d7db6367417b2b2512b9b -title: Як знайти символи за допомогою "лінивого" збігу +title: Пошук символів за допомогою лінивого збігу challengeType: 1 forumTopicId: 301341 dashedName: find-characters-with-lazy-matching @@ -8,19 +8,19 @@ dashedName: find-characters-with-lazy-matching # --description-- -У регулярних виразах "жадібний" збіг (greedy) знаходить найдовшу можливу частину рядка, яка відповідає шаблону регулярного виразу та видає його як збіг. Альтернативою є "лінивий" збіг (lazy), який знаходить найменшу можливу частину рядка, що відповідає шаблону регулярного виразу. +Жадібний збіг знаходить найдовшу частину рядка, яка відповідає шаблону регулярного виразу та повертає його як збіг. Альтернативою є лінивий збіг, що знаходить найменшу частину рядка, яка відповідає шаблону регулярного виразу. Ви можете застосувати регулярний вираз `/t[a-z]*i/` до рядка `"titanic"`. Цей регулярний вираз фактично є шаблоном, який починається з `t`, закінчується на `i` та має кілька літер між ними. -Регулярні вирази за замовчуванням "жадібні", тому збіг видасть `["titani"]`. Він знаходить найбільший можливий підрядок, який відповідає шаблону. +Регулярні вирази за замовчуванням «жадібні», тому збіг поверне `["titani"]`. Він знаходить найбільший можливий підрядок, який відповідає шаблону. -Однак ви можете застосувати символ `?`, щоб змінити його на "лінивий" пошук збігів. Код `"titanic"`, зіставлений зі скоригованим регулярним виразом `/t[a-z]*?i/`, видає `["ti"]`. +Однак ви можете використати символ `?`, щоб змінити його на «лінивий» пошук. `"titanic"`, зіставлений зі скоригованим регулярним виразом `/t[a-z]*?i/` поверне `["ti"]`. -**Примітка:** Слід уникати синтаксичного аналізу HTML регулярних виразів, але ви можете зіставляти рядок HTML з шаблоном за допомогою регулярних виразів. +**Примітка:** варто уникати синтаксичного аналізу HTML (парсингу) регулярних виразів, але за допомогою регулярних виразів можна зіставляти рядок HTML з шаблоном. # --instructions-- -Виправте регулярний вираз `/<.*>/`, аби він видав теґ HTML `

`, а не текст `"

Winter is coming

"`. Пам'ятайте, що спеціальний символ `.` в регулярному виразі відповідає будь-якому символу. +Виправте регулярний вираз `/<.*>/`, щоб він повернув HTML тег `

`, а не текст `"

Winter is coming

"`. Пам’ятайте, що байдужий символ `.` в регулярному виразі відповідає будь-якому символу. # --hints-- @@ -30,7 +30,7 @@ dashedName: find-characters-with-lazy-matching assert(result[0] == '

'); ``` -`myRegex` повинен використовувати "лінивий" пошук збігів +`myRegex` має використати «лінивий» пошук ```js assert(/[^\\][\*\+\?]\?/.test(myRegex)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/find-more-than-the-first-match.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/find-more-than-the-first-match.md index a34e0f5200b..35520059e4f 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/find-more-than-the-first-match.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/find-more-than-the-first-match.md @@ -1,6 +1,6 @@ --- id: 587d7db4367417b2b2512b93 -title: Як знайти більше одного збігу +title: Як знайти не лише перший збіг challengeType: 1 forumTopicId: 301342 dashedName: find-more-than-the-first-match @@ -16,39 +16,39 @@ let ourRegex = /Repeat/; testStr.match(ourRegex); ``` -Тут `match` видасть `["Repeat"]`. +`match` поверне `["Repeat"]`. -Щоб шукати або вилучати шаблон більше одного разу, ви можете використовувати прапорець глобального пошуку: `g`. +Щоб знайти або вилучити шаблон більше одного разу, ви можете використати прапорець глобального пошуку: `g`. ```js let repeatRegex = /Repeat/g; testStr.match(repeatRegex); ``` -І в цьому випадку `match` видасть значення `["Repeat", "Repeat", "Repeat"]` +А тут `match` поверне значення `["Repeat", "Repeat", "Repeat"]` # --instructions-- Знайдіть і вилучіть обидва слова `Twinkle` з рядка `twinkleStar` за допомогою регулярного виразу `starRegex`. **Примітка** -Ви можете мати декілька прапорців у вашому регулярному виразі, як у `/search/gi` +Ви можете застосувати декілька прапорців до регулярного виразу: `/search/gi` # --hints-- -Ваш регулярний вираз `starRegex` повинен використовувати глобальний прапорець `g` +Ваш регулярний вираз `starRegex` має використати глобальний прапорець `g` ```js assert(starRegex.flags.match(/g/).length == 1); ``` -Ваш регулярний вираз `starRegex` повинен використовувати прапорець без урахування регістру `i` +Ваш регулярний вираз `starRegex` має використати прапорець без урахування регістру `i` ```js assert(starRegex.flags.match(/i/).length == 1); ``` -Ваш збіг повинен відповідати обидвом випадкам, у яких трапляється слово `Twinkle` +Ваш збіг має збігатися з двома випадками слова `Twinkle` ```js assert( @@ -60,7 +60,7 @@ assert( ); ``` -Ваш збіг `result` повинен містити в собі два елементи. +Ваш збіг `result` має містити два елементи. ```js assert(result.length == 2); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/find-one-or-more-criminals-in-a-hunt.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/find-one-or-more-criminals-in-a-hunt.md index 1beb7d9de8f..82898e2dd20 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/find-one-or-more-criminals-in-a-hunt.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/find-one-or-more-criminals-in-a-hunt.md @@ -1,6 +1,6 @@ --- id: 587d7db7367417b2b2512b9c -title: Знайдіть одного або більше злочинців у переслідуванні +title: Пошук одного або більше злочинців у переслідуванні challengeType: 1 forumTopicId: 301343 dashedName: find-one-or-more-criminals-in-a-hunt @@ -8,11 +8,11 @@ dashedName: find-one-or-more-criminals-in-a-hunt # --description-- -Настав час зупинитися та перевірити ваші нові навички написання регулярних виразів. Група злочинців втекла з в'язниці, але ви не знаєте скільки. Однак ви знаєте, що вони тримаються разом, коли довкола них інші люди. Ви відповідаєте за те, щоб знайти всіх злочинців одразу. +Настав час зупинитися та перевірити ваші нові навички написання регулярних виразів. Група злочинців втекла з в’язниці, але ви не знаєте скільки. Однак ви знаєте, що вони тримаються разом, коли довкола них інші люди. Ви відповідаєте за те, щоб знайти всіх злочинців одразу. Ось приклад, який допоможе вам розібратися, як це зробити: -Регулярний вираз `/z+/` відповідає літері `z`, коли вона з'являється один або кілька разів поспіль. Він знайде збіги в усіх цих рядках: +Регулярний вираз `/z+/` відповідає літері `z`, якщо вона з’являється один або більше разів поспіль. Він знайде збіги в усіх цих рядках: ```js "z" @@ -32,7 +32,7 @@ dashedName: find-one-or-more-criminals-in-a-hunt # --instructions-- -Напишіть "жадібний" регулярний вираз, який знайде одного або кількох злочинців в групі інших людей. Злочинець позначений великою літерою `C`. +Напишіть «жадібний» регулярний вираз, який знайде одного або більше злочинців серед групи інших людей. Злочинець позначений великою літерою `C`. # --hints-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/ignore-case-while-matching.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/ignore-case-while-matching.md index 965d1049db9..6910870d1e3 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/ignore-case-while-matching.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/ignore-case-while-matching.md @@ -8,15 +8,15 @@ dashedName: ignore-case-while-matching # --description-- -Дотепер ви вивчали регулярні вирази, які знаходять точні збіги рядків. Але іноді ви, можливо, захочете також знайти збіги без урахування регістру. +Дотепер ви вивчали регулярні вирази, які знаходять точні збіги рядків. Можливо, колись вам знадобиться знайти збіги без урахування регістру. -Регістр (інколи регістр літер) - це різниця між великими та малими літерами. Прикладами великих літер є `A`, `B` і `C`. Прикладами малих літер є `a`, `b` і `c`. +Регістр (інколи регістр літер) — це різниця між великими та малими літерами. Прикладами верхнього регістру є `A`, `B` та `C`. Прикладами нижнього регістру є `a`, `b` та `c`. -Ви можете знаходити збіги обох регістрів за допомогою так званого прапорця. Існують інші прапорці, але тут ви зосередитесь на тому, який не враховує регістр - `i`. Ви можете використати його, додавши до регулярного виразу. Прикладом використання цього прапорця є `/ignorecase/i`. Цей регулярний вираз може відповідати рядкам `ignorecase`, `igNoreCase` та `IgnoreCase`. +Ви можете знайти збіги обох регістрів за допомогою прапорця. Існують й інші прапорці, але ми зосередимось на тому, який не враховує регістр: `i`. Ви можете використати його, додавши до регулярного виразу. Приклад використання цього прапорця: `/ignorecase/i`. Цей регулярний вираз збігається з рядками `ignorecase`, `igNoreCase` та `IgnoreCase`. # --instructions-- -Напишіть регулярний вираз `fccRegex`, щоб знайти `freeCodeCamp` незалежно від регістру. Ваш регулярний вираз не повинен збігатися зі скороченнями або варіаціями з пробілами. +Напишіть регулярний вираз `fccRegex`, щоб він збігався з `freeCodeCamp` незалежно від регістру. Ваш регулярний вираз не повинен збігатися зі скороченнями або варіаціями з пробілами. # --hints-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-a-literal-string-with-different-possibilities.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-a-literal-string-with-different-possibilities.md index 125e326c4ad..6d41b86e7c0 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-a-literal-string-with-different-possibilities.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-a-literal-string-with-different-possibilities.md @@ -1,6 +1,6 @@ --- id: 587d7db4367417b2b2512b90 -title: Пошук точних збігів рядка з різними варіантами +title: Точні збіги рядка з різними варіантами challengeType: 1 forumTopicId: 301345 dashedName: match-a-literal-string-with-different-possibilities @@ -8,63 +8,63 @@ dashedName: match-a-literal-string-with-different-possibilities # --description-- -За допомогою таких регулярних виразів, як `/coding/` можна шукати шаблон `coding` в іншому рядку. +За допомогою регулярних виразів, як-от `/coding/`, можна знайти шаблон `coding` в іншому рядку. -Це корисно для пошуку окремих рядків, але він обмежений лише одним шаблоном. Ви можете шукати кілька шаблонів одразу за допомогою оператора `alternation` або `OR`: `|`. +Це корисно для пошуку окремих рядків, але обмежено лише одним шаблоном. Декілька шаблонів можна знайти за допомогою оператора `alternation` або `OR`: `|`. -Цей оператор знаходить збіги шаблонів до або після нього. Наприклад, якщо ви хочете знайти збіги рядків `yes` або `no`, ваш регулярний вираз матиме такий вигляд: `/yes|no/`. +Цей оператор знаходить збіги шаблонів до або після нього. Наприклад, якщо ви хочете знайти збіги рядків `yes` або `no`, вам знадобиться регулярний вираз `/yes|no/`. -Ви також можете шукати більше ніж два шаблони одночасно. Ви можете зробити це, додавши більше шаблонів з більшою кількістю операторів `OR`, що їх розділяють, наприклад: `/yes|no|maybe/`. +Ви можете шукати більше двох шаблонів. Для цього додайте більше шаблонів та операторів `OR`, розділивши їх: `/yes|no|maybe/`. # --instructions-- -Напишіть регулярний вираз `petRegex`, який відповідав би таким домашнім тваринам: `dog`, `cat`, `bird` або `fish`. +Допишіть регулярний вираз `petRegex`, щоб він збігався з тваринами `dog`, `cat`, `bird` чи `fish`. # --hints-- -Ви маєте отримати `true` для рядка `John has a pet dog.` за допомогою вашого регулярного виразу `petRegex` +Регулярний вираз `petRegex` має повернути `true` для рядка `John has a pet dog.` ```js petRegex.lastIndex = 0; assert(petRegex.test('John has a pet dog.')); ``` -Ви маєте отримати `false` для рядка `Emma has a pet rock.` за допомогою вашого регулярного виразу `petRegex` +Регулярний вираз `petRegex` має повернути `false` для рядка `Emma has a pet rock.` ```js petRegex.lastIndex = 0; assert(!petRegex.test('Emma has a pet rock.')); ``` -Ви маєте отримати `true` для рядка `Emma has a pet bird.` за допомогою вашого регулярного виразу `petRegex` +Регулярний вираз `petRegex` має повернути `true` для рядка `Emma has a pet bird.` ```js petRegex.lastIndex = 0; assert(petRegex.test('Emma has a pet bird.')); ``` -Ви маєте отримати `true` для рядка `Liz has a pet cat.` за допомогою вашого регулярного виразу `petRegex` +Регулярний вираз `petRegex` має повернути `true` для рядка `Liz has a pet cat.` ```js petRegex.lastIndex = 0; assert(petRegex.test('Liz has a pet cat.')); ``` -Ви маєте отримати `false` для рядка `Kara has a pet dolphin.` за допомогою вашого регулярного виразу `petRegex` +Регулярний вираз `petRegex` має повернути `false` для рядка `Kara has a pet dolphin.` ```js petRegex.lastIndex = 0; assert(!petRegex.test('Kara has a pet dolphin.')); ``` -Ви маєте отримати `true` для рядка `Alice has a pet fish.` за допомогою вашого регулярного виразу `petRegex` +Регулярний вираз `petRegex` має повернути `true` для рядка `Alice has a pet fish.` ```js petRegex.lastIndex = 0; assert(petRegex.test('Alice has a pet fish.')); ``` -Ви маєте отримати `false` для рядка `Jimmy has a pet computer.` за допомогою вашого регулярного виразу `petRegex` +Регулярний вираз `petRegex` має повернути `false` для рядка `Jimmy has a pet computer.` ```js petRegex.lastIndex = 0; diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-letters-and-numbers.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-letters-and-numbers.md index c6da06c44c6..45058226991 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-letters-and-numbers.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-letters-and-numbers.md @@ -1,6 +1,6 @@ --- id: 587d7db7367417b2b2512b9f -title: Пошук збігів з усіма літерами та числами +title: Збіги усіх літер та чисел challengeType: 1 forumTopicId: 301346 dashedName: match-all-letters-and-numbers @@ -8,9 +8,9 @@ dashedName: match-all-letters-and-numbers # --description-- -Використовуючи класи символів, ви мали змогу шукати всі літери алфавіту за допомогою `[a-z]`. Цей клас символів настільки поширений, що для нього існує скорочення, хоча воно й містить декілька додаткових символів. +Використовуючи символьні класи, ви знайшли всі літери алфавіту за допомогою `[a-z]`. Такий тип символьних класів настільки популярний, що для нього існує скорочення, хоча воно й містить декілька додаткових символів. -Найближчий клас символів у JavaScript, який дозволяє встановити відповідність з алфавітом, - `\w`. Це скорочення дорівнює `[A-Za-z0-9_]`. Цей клас символів відповідає великим і малим літерам та числам. Зверніть увагу, що цей клас символів також містить символ підкреслення (`_`). +Символьним класом, який дозволяє виконати найближчий збіг з алфавітом, є `\w`. Це скорочення дорівнює `[A-Za-z0-9_]`. Цей символьний клас відповідає великим і малим літерам та числам. Зверніть увагу, що цей символьний клас також містить знак підкреслення (`_`). ```js let longHand = /[A-Za-z0-9_]+/; @@ -23,29 +23,29 @@ longHand.test(varNames); shortHand.test(varNames); ``` -У результаті використання усіх чотирьох викликів `test` ви отримаєте `true`. +Усі чотири виклики `test` повернуть `true`. -Ці скорочення класів символів також відомі як скорочення класів символів. +Скорочені позначення символьні класи також відомі як скорочені символьні класи. # --instructions-- -Застосуйте скорочення класу символів `\w`, щоб підрахувати кількість буквено-цифрових символів у різних цитатах і рядках. +Використайте скорочений символьний клас `\w`, щоб підрахувати кількість буквено-цифрових символів у різних цитатах і рядках. # --hints-- -Ваш регулярний вираз повинен використовувати глобальний прапорець. +Ваш регулярний вираз має використати глобальний прапорець. ```js assert(alphabetRegexV2.global); ``` -Ваш регулярний вираз повинен використовувати скорочений символ `\w`, щоб встановити відповідність з усіма символами, які є буквено-цифровими. +Ваш регулярний вираз має використати скорочений символ `\w`, щоб збігатись з усіма буквено-цифровими символами. ```js assert(/\\w/.test(alphabetRegexV2.source)); ``` -Ваш регулярний вираз повинен знайти 31 буквено-цифровий символ в рядку `The five boxing wizards jump quickly.` +Ваш регулярний вираз повинен знайти 31 буквено-цифровий символ у рядку `The five boxing wizards jump quickly.` ```js assert( @@ -53,7 +53,7 @@ assert( ); ``` -Ваш регулярний вираз повинен знайти 32 буквено-цифрових символи в рядку `Pack my box with five dozen liquor jugs.` +Ваш регулярний вираз повинен знайти 32 буквено-цифрових символи у рядку `Pack my box with five dozen liquor jugs.` ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-non-numbers.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-non-numbers.md index 08b2cf50ad1..f15a0407894 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-non-numbers.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-non-numbers.md @@ -1,6 +1,6 @@ --- id: 587d7db8367417b2b2512ba1 -title: Пошук збігів з усіма нечисловими символами +title: Збіги усіх нецифр challengeType: 1 forumTopicId: 301347 dashedName: match-all-non-numbers @@ -8,23 +8,23 @@ dashedName: match-all-non-numbers # --description-- -У попередньому завданні показано, як шукати цифри, використовуючи скорочення `\d` за допомогою малої літери `d`. Ви також можете шукати нецифрові символи за допомогою скорочення, яке використовує велику літеру `D`. +У минулому завданні ви дізнались, як шукати цифри за допомогою скорочення `\d` з `d` у нижньому регістрі. Ви також можете шукати нецифрові символи за допомогою схожого скорочення, яке використовує `D` у верхньому регістрі. -Скорочення для пошуку нецифрових символів - `\D`. Це дорівнює класу символів `[^0-9]`, який шукає окремий символ, що не є числом від 0 до 9. +Скороченням для пошуку нецифрових символів є `\D`. Це дорівнює символьному класу `[^0-9]`, який шукає окремий символ, що не є цифрою від 0 до 9. # --instructions-- -Застосуйте скорочений клас символів для нецифрових символів `\D`, щоб підрахувати кількість нецифрових символів у назвах фільмів. +Використайте скорочений символьний клас для нецифрових символів `\D`, щоб підрахувати кількість нецифрових символів у назвах фільмів. # --hints-- -Ваш регулярний вираз повинен містити скорочений символ, щоб знайти збіги з нецифровими символами +Ваш регулярний вираз має містити символ скорочення, щоб знайти збіги з нецифровими символами ```js assert(/\\D/.test(noNumRegex.source)); ``` -Ваш регулярний вираз повинен використовувати глобальний прапорець. +Ваш регулярний вираз має використати глобальний прапорець. ```js assert(noNumRegex.global); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-numbers.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-numbers.md index 130d1881fa2..7faf2a32766 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-numbers.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-numbers.md @@ -1,6 +1,6 @@ --- id: 5d712346c441eddfaeb5bdef -title: Пошук збігів з усіма числовими символами +title: Збіги усіх цифр challengeType: 1 forumTopicId: 18181 dashedName: match-all-numbers @@ -8,23 +8,23 @@ dashedName: match-all-numbers # --description-- -Ви вивчили скорочення для поширених шаблонів, наприклад для алфавітно-цифрового. Ще один поширений шаблон це пошук лише цифр або чисел. +Ви дізнались про скорочення поширених шаблонів, наприклад, алфавітно-цифрового. Іншим поширеним шаблоном є пошук або цифр, або чисел. -Скорочення для пошуку цифрових символів `\d`, з нижнім регістром `d`. Це дорівнює класу символів `[0-9]`, який шукає окремий символ, що є числом від 0 до 9. +Скороченням для пошуку цифрових символів є `\d`, з `d` у нижньому регістрі. Це дорівнює символьному класу `[0-9]`, який шукає окремий символ, що є цифрою від 0 до 9. # --instructions-- -Застосуйте скорочений клас символів `\d`, щоб підрахувати кількість цифрових символів у назвах фільмів. Числа прописом («шість» замість 6) не рахуються. +Використайте скорочений символьний клас `\d`, щоб підрахувати кількість цифрових символів у назвах фільмів. Числа прописом («шість» замість 6) не враховуються. # --hints-- -Ваш регулярний вираз повинен містити скорочений символ, щоб знайти збіги з цифровими символами +Ваш регулярний вираз має містити символ скорочення, щоб знайти збіги з цифровими символами ```js assert(/\\d/.test(numRegex.source)); ``` -Ваш регулярний вираз повинен використовувати глобальний прапорець. +Ваш регулярний вираз має використати глобальний прапорець. ```js assert(numRegex.global); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-anything-with-wildcard-period.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-anything-with-wildcard-period.md index 41d11d89b71..4bea4738c0d 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-anything-with-wildcard-period.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-anything-with-wildcard-period.md @@ -1,6 +1,6 @@ --- id: 587d7db5367417b2b2512b94 -title: Пошук усього за допомогою спеціального символу «.» +title: Пошук збігів за допомогою байдужої крапки challengeType: 1 forumTopicId: 301348 dashedName: match-anything-with-wildcard-period @@ -8,9 +8,9 @@ dashedName: match-anything-with-wildcard-period # --description-- -Іноді ви не знаєте (або вам не потрібні) точні символи у шаблонах. Обмірковування усіх слів які відповідають, скажімо, орфографічній помилці, займе багато часу. На щастя, ви можете заощадити час, використовуючи спеціальний символ: `.` +Іноді ви не знатимете (або вам не потрібно знати) символи шаблонів. Обмірковування усіх слів які відповідають, скажімо, орфографічній помилці, займе багато часу. На щастя, ви можете заощадити час, використавши байдужий символ: `.` -Спеціальний символ `.` відповідатиме будь-якому одному символу. Спеціальний символ також називають `dot` та `period`. Цей спеціальний символ можна використати як і будь-який інший символ у регулярному виразі. Наприклад, якщо ви хотіли б знайти `hug`, `huh`, `hut`, і `hum`, ви можете використати регулярний вираз `/hu./` для пошуку усіх чотирьох слів. +Байдужий символ `.` збігається з будь-яким одним символом. Байдужий символ також називають крапкою (англ. `dot` та `period`). Цей байдужий символ використовують як і будь-який інший символ у регулярному виразі. Наприклад, якщо ви хочете знайти збіги `hug`, `huh`, `hut` та `hum`, то використайте регулярний вираз `/hu./` для усіх чотирьох слів. ```js let humStr = "I'll hum a song"; @@ -20,21 +20,21 @@ huRegex.test(humStr); huRegex.test(hugStr); ``` -У результаті використання обох `test` викликів ви отримаєте `true`. +Обидва виклики `test` повернуть `true`. # --instructions-- -Завершіть регулярний вираз `unRegex` так щоб він знайшов такі стрічки як: `run`, `sun`, `fun`, `pun`. `nun`, і `bun`. Ваш регулярний вираз повинен використовувати спеціальний символ. +Допишіть регулярний вираз `unRegex`, щоб він збігався з рядками `run`, `sun`, `fun`, `pun`, `nun` та `bun`. Ваш регулярний вираз має використати байдужий символ. # --hints-- -Ви повинні використовувати метод `.test()`. +Використайте метод `.test()`. ```js assert(code.match(/\.test\(.*\)/)); ``` -Ви повинні використовувати спеціальний символ у регулярному виразі `unRegex` +Використайте байдужий символ у регулярному виразі `unRegex` ```js assert(/\./.test(unRegex.source)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-beginning-string-patterns.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-beginning-string-patterns.md index e41dd7ba6bd..49b4be3f621 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-beginning-string-patterns.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-beginning-string-patterns.md @@ -1,6 +1,6 @@ --- id: 587d7db7367417b2b2512b9d -title: Пошук відповідностей початковим зразкам рядків +title: Збіги початку рядка challengeType: 1 forumTopicId: 301349 dashedName: match-beginning-string-patterns @@ -8,9 +8,9 @@ dashedName: match-beginning-string-patterns # --description-- -Попередні завдання показали, що регулярні вирази можуть використовуватися для пошуку збігів. Також вони використовуються для пошуку шаблонів у певних позиціях рядків. +Попередні завдання показали, що регулярні вирази можна використовувати для багатьох збігів. Їх також використовують для пошуку шаблонів у певному місці рядка. -У попередньому завданні ви використовували символ карет (`^`) всередині набору символів задля того, щоб створити набір негативних символів у вигляді `[^thingsThatWillNotBeMatched]`. За межами набору символів, карет використовується для пошуку шаблонів на початку рядків. +У попередньому завданні ви використали символ карет (`^`) всередині набору символів для того, щоб створити набір заперечних символів у вигляді `[^thingsThatWillNotBeMatched]`. За межами набору символів, карет використовують для пошуку шаблонів на початку рядка. ```js let firstString = "Ricky is first and can be found."; @@ -20,11 +20,11 @@ let notFirst = "You can't find Ricky now."; firstRegex.test(notFirst); ``` -Перший виклик `test` повернеться як `true`, тоді ж як другий повернеться як `false`. +Перший виклик `test` поверне `true`, а другий поверне `false`. # --instructions-- -Використовуйте символ карет у регулярному виразі для того, щоб знайти `Cal` лише на початку рядка `rickyAndCal`. +Використайте символ карет у регулярному виразі, щоб знайти `Cal` лише на початку рядка `rickyAndCal`. # --hints-- @@ -34,7 +34,7 @@ firstRegex.test(notFirst); assert(calRegex.source == '^Cal'); ``` -Ваш регулярний вираз не повинен містити жодних маркерів. +Ваш регулярний вираз не повинен містити жодних прапорців. ```js assert(calRegex.flags == ''); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-characters-that-occur-one-or-more-times.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-characters-that-occur-one-or-more-times.md index 4d828572e9d..704d9cb8ded 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-characters-that-occur-one-or-more-times.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-characters-that-occur-one-or-more-times.md @@ -1,6 +1,6 @@ --- id: 587d7db6367417b2b2512b99 -title: Пошук збігів, що трапляються один чи більше разів +title: Збіги символів, які трапляються один чи більше разів challengeType: 1 forumTopicId: 301350 dashedName: match-characters-that-occur-one-or-more-times @@ -8,27 +8,27 @@ dashedName: match-characters-that-occur-one-or-more-times # --description-- -Іноді вам треба знайти символ (або групу символів), що з'являються один чи більше разів поспіль. Це означає, що він зустрічається принаймні раз та може повторюватися. +Іноді потрібно знайти символ (або групу символів), які з’являються один чи більше разів поспіль. Це означає, що він зустрічається принаймні раз та може повторюватися. -Можна використати `+` символ для того, щоб перевірити чи це так. Пам'ятайте, символ або шаблон мають бути постійно присутніми. Тобто символ має повторюватися один за іншим. +Можна використати символ `+`, щоб перевірити чи це так. Пам’ятайте, символ або шаблон мають бути послідовними. Тобто символ має повторюватися. -Наприклад, `/a+/g` знайде один збіг в `abc` та поверне `["a"]`. Завдяки `+`, програма також знайде один збіг в `aabc` та поверне `["aa"]`. +Наприклад, `/a+/g` знайде один збіг в `abc` та поверне `["a"]`. `+` також знайде один збіг в `aabc` та поверне `["aa"]`. -Але якщо замість цього була виконана перевірка рядка `abab`, було б знайдено два збіги та повернено `["a", "a"]`, так як символи `a` не стоять підряд: між ними є символ `b`. І нарешті, оскільки в рядку `bcd` немає `a`, програма не знайде збігів. +Але якби він перевірив рядок `abab`, було б знайдено два збіги та повернено `["a", "a"]`, оскільки символи `a` не стоять поруч: між ними є символ `b`. Зрештою, оскільки в рядку `bcd` немає `a`, збігу не буде. # --instructions-- -Ви хочете знайти збіги, коли літера `s` з'являється один чи більше разів у `Mississippi`. Напишіть регулярний вираз, що містить знак `+`. +Вам потрібно знайти збіги, коли літера `s` з’являється один чи більше разів у `Mississippi`. Напишіть регулярний вираз, що містить знак `+`. # --hints-- -Ваш регулярний вираз `myRegex` має використовувати символ `+` для збігу з одним чи більше `s`-символами. +Ваш регулярний вираз `myRegex` має використати символ `+`, щоб збігтися з одним чи більше символами `s`. ```js assert(/\+/.test(myRegex.source)); ``` -Ваш регулярний вираз `myRegex` повинен збігатися з двома елементами. +Ваш регулярний вираз `myRegex` має знайти збіги для двох елементів. ```js assert(result.length == 2); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-characters-that-occur-zero-or-more-times.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-characters-that-occur-zero-or-more-times.md index aef1fc5ce93..b664e9123b9 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-characters-that-occur-zero-or-more-times.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-characters-that-occur-zero-or-more-times.md @@ -1,6 +1,6 @@ --- id: 587d7db6367417b2b2512b9a -title: Пошук збігів, що трапляються нуль чи більше разів +title: Збіги символів, які трапляються нуль чи більше разів challengeType: 1 forumTopicId: 301351 dashedName: match-characters-that-occur-zero-or-more-times @@ -8,9 +8,9 @@ dashedName: match-characters-that-occur-zero-or-more-times # --description-- -Останнє завдання потребувало використання знака `+` для пошуку символів, що зустрічаються один чи більше разів. Існує також варіант пошуку символів, що зустрічаються нуль чи більше разів. +У попередньому завданні ми використали `+`, щоб знайти символи, які зустрічаються один чи більше разів. Існує й варіант пошуку символів, які зустрічаються нуль чи більше разів. -Символ, за допомогою якого це можна зробити, називається "астерікс" або "зірочка": `*`. +Для цього використовують зірочку: `*`. ```js let soccerWord = "gooooooooal!"; @@ -22,15 +22,15 @@ gPhrase.match(goRegex); oPhrase.match(goRegex); ``` -По черзі три виклики `match` повернуть значення `["goooooooo"]`, `["g"]` та `null`. +Три виклики `match` повернуть значення `["goooooooo"]`, `["g"]` та `null` по черзі. # --instructions-- -Для цього завдання, `chewieQuote` було привласнено значення рядка `Aaaaaaaaaaaaaaaarrrgh!` за замовчуванням. Створіть регулярний вираз `chewieRegex`, що використовує символ `*`, для пошуку збігів з великим символом `A`, за яким одразу стоїть нуль чи більша кількість маленьких символів `a` у `chewieQuote`. Ваш регулярний вираз не потребує маркерів чи класів символів та не може збігатися з іншими лапками. +Для цього завдання `chewieQuote` було ініціалізовано як рядок `Aaaaaaaaaaaaaaaarrrgh!`. Створіть регулярний вираз `chewieRegex`, який використовує символ `*`, щоб збігтися з символом `A` у верхньому регістрі, за яким одразу стоїть нуль чи більше символів `a` у нижньому регістрі в `chewieQuote`. Ваш регулярний вираз не потребує прапорців чи символьних класів, а також не може збігатися з іншими цитатами. # --hints-- -Ваш регулярний вираз`chewieRegex` має використовувати символ `*` задля пошуку збігів нуля чи більше `a`-символів. +Ваш регулярний вираз `chewieRegex` має використати символ `*`, щоб збігтися з нуль чи більше символами `a`. ```js assert(/\*/.test(chewieRegex.source)); @@ -48,7 +48,7 @@ assert(result[0][0] === 'A'); assert(result[0] === 'Aaaaaaaaaaaaaaaa'); ``` -У вашому регулярному виразі `chewieRegex` має збігатися 16 символів із рядком `chewieQuote`. +Ваш регулярний вираз `chewieRegex` повинен збігатися з 16 символами у `chewieQuote`. ```js assert(result[0].length === 16); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-ending-string-patterns.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-ending-string-patterns.md index 4e91a89aa2a..a7e1ff647ee 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-ending-string-patterns.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-ending-string-patterns.md @@ -34,7 +34,7 @@ storyRegex.test(noEnding); assert(lastRegex.source == 'caboose$'); ``` -Ваш регулярний вираз не повинен містити жодних маркерів. +Ваш регулярний вираз не повинен містити жодних прапорців. ```js assert(lastRegex.flags == ''); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-everything-but-letters-and-numbers.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-everything-but-letters-and-numbers.md index 38657a10248..5474c421c09 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-everything-but-letters-and-numbers.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-everything-but-letters-and-numbers.md @@ -20,7 +20,7 @@ numbers.match(shortHand); sentence.match(shortHand); ``` -Перший виклик `match` повернеться як `["%"]`, а другий — як `["!"]`. +Перший виклик `match` поверне значення `["%"]`, а другий поверне `["!"]`. # --instructions-- @@ -28,7 +28,7 @@ sentence.match(shortHand); # --hints-- -Ваш регулярний вираз повинен використовувати глобальний прапорець. +Ваш регулярний вираз має використати глобальний прапорець. ```js assert(nonAlphabetRegex.global); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-letters-of-the-alphabet.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-letters-of-the-alphabet.md index 57ae8bedd45..21a21698967 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-letters-of-the-alphabet.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-letters-of-the-alphabet.md @@ -1,6 +1,6 @@ --- id: 587d7db5367417b2b2512b96 -title: Встановлення відповідності до літер алфавіту +title: Збіги літер алфавіту challengeType: 1 forumTopicId: 301354 dashedName: match-letters-of-the-alphabet @@ -8,11 +8,11 @@ dashedName: match-letters-of-the-alphabet # --description-- -Ви бачили, як можна використовувати набори символів, щоб визначити групу символів для відповідності, але довелося б набирати дуже багато, якщо потрібно знайти відповідність великому діапазону символів (наприклад, кожній літері в алфавіті). На щастя, для цього існує вбудована функція, що робить це швидко та просто. +Ви побачили, як можна використати набори символів, щоб визначити групу символів для збігів. Але довелось би багато писати, якщо потрібно знайти збіги для великого діапазону символів (наприклад, кожної літери в алфавіті). На щастя, для цього існує вбудована функціональність, яка робить це швидко та просто. -Всередині набору символів можна визначити діапазон символів для пошуку відповідності з використанням символу дефіс: `-`. +Всередині набору символів можна визначити діапазон символів для пошуку збігів, використавши дефіс `-`. -Наприклад, для пошуку літер нижнього регістру від `a` до `e` можна використати `[a-e]`. +Наприклад, щоб знайти збіги літер нижнього регістру від `a` до `e`, використайте `[a-e]`. ```js let catStr = "cat"; @@ -24,29 +24,29 @@ batStr.match(bgRegex); matStr.match(bgRegex); ``` -По черзі три виклики `match` повернуться як `["cat"]`, `["bat"]` і `null`. +Три виклики `match` повернуть значення `["cat"]`, `["bat"]` та `null` по черзі. # --instructions-- -Знайдіть відповідності до усіх літер у рядку `quoteSample`. +Знайдіть збіги усіх літер у рядку `quoteSample`. -**Примітка**: не забудьте вказати літери як верхнього, так і нижнього регістру. +**Примітка:** знайдіть збіги літер як верхнього, так і нижнього регістру. # --hints-- -Регулярний вираз `alphabetRegex` повинен знайти збіги для 35 елементів. +Ваш регулярний вираз `alphabetRegex` має знайти збіги для 35 елементів. ```js assert(result.length == 35); ``` -Ваш регулярний вираз `alphabetRegex` повинен використовувати глобальний прапорець. +Ваш регулярний вираз `alphabetRegex` має використати глобальний прапорець. ```js assert(alphabetRegex.flags.match(/g/).length == 1); ``` -Ваш регулярний вираз `alphabetRegex` повинен використовувати прапорець без урахування регістру. +Ваш регулярний вираз `alphabetRegex` має використати прапорець без урахування регістру. ```js assert(alphabetRegex.flags.match(/i/).length == 1); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-literal-strings.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-literal-strings.md index be65a9b982a..6c11fe76c8c 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-literal-strings.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-literal-strings.md @@ -1,6 +1,6 @@ --- id: 587d7db3367417b2b2512b8f -title: Пошук точного збігу для рядка +title: Точні збіги рядків challengeType: 1 forumTopicId: 301355 dashedName: match-literal-strings @@ -8,7 +8,7 @@ dashedName: match-literal-strings # --description-- -У минулому завданні ви шукали слово `Hello`, використовуючи регулярний вираз `/Hello/`. Цей регулярний вираз шукав точний збіг для рядка `Hello`. Ось ще один приклад пошуку точного збігу для рядка `Kevin`: +У минулому завданні ви шукали слово `Hello`, використовуючи регулярний вираз `/Hello/`. Цей регулярний вираз шукав точний збіг рядка `Hello`. Ось ще один приклад пошуку точного збігу рядка `Kevin`: ```js let testStr = "Hello, my name is Kevin."; @@ -16,40 +16,40 @@ let testRegex = /Kevin/; testRegex.test(testStr); ``` -Цей виклик `test` повернеться як `true`. +Цей виклик `test` поверне `true`. -Жодна інша форма слова `Kevin` не буде збігом. Наприклад, регулярний вираз `/Kevin/` не знайде відповідності `kevin` або `KEVIN`. +Жодна інша форма слова `Kevin` не буде збігом. Наприклад, регулярний вираз `/Kevin/` не збігатиметься з `kevin` або `KEVIN`. ```js let wrongRegex = /kevin/; wrongRegex.test(testStr); ``` -Цей виклик `test` повернеться як `false`. +Цей виклик `test` поверне `false`. -Майбутнє завдання покаже, як знайти збіги для інших форм також. +У наступному завданні ви дізнаєтесь, як знайти збіги різних форм. # --instructions-- -Виконайте регулярний вираз `waldoRegex`, щоб знайти `"Waldo"` в рядку `waldoIsHiding` з точним збігом. +Допишіть регулярний вираз `waldoRegex`, щоб знайти точний збіг `"Waldo"` у рядку `waldoIsHiding`. # --hints-- -Ваш регулярний вираз `waldoRegex` повинен знайти рядок `Waldo` +Регулярний вираз `waldoRegex` має знайти рядок `Waldo` ```js waldoRegex.lastIndex = 0; assert(waldoRegex.test(waldoIsHiding)); ``` -Ваш регулярний вираз `waldoRegex` не повинен знайти нічого іншого. +Регулярний вираз `waldoRegex` не повинен шукати нічого іншого. ```js waldoRegex.lastIndex = 0; assert(!waldoRegex.test('Somewhere is hiding in this text.')); ``` -За допомогою регулярного виразу ви повинні знайти точний збіг для рядка. +Знайдіть точний збіг рядка за допомогою регулярного виразу. ```js assert(!/\/.*\/i/.test(code)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-non-whitespace-characters.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-non-whitespace-characters.md index c69a5ad204b..523bc4d5f85 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-non-whitespace-characters.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-non-whitespace-characters.md @@ -26,7 +26,7 @@ whiteSpace.match(nonSpaceRegex).length; # --hints-- -Ваш регулярний вираз повинен використовувати глобальний прапорець. +Ваш регулярний вираз має використати глобальний прапорець. ```js assert(countNonWhiteSpace.global); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-numbers-and-letters-of-the-alphabet.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-numbers-and-letters-of-the-alphabet.md index 65fca78d210..9e2c162d989 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-numbers-and-letters-of-the-alphabet.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-numbers-and-letters-of-the-alphabet.md @@ -1,6 +1,6 @@ --- id: 587d7db5367417b2b2512b97 -title: Встановлення відповідності до чисел та літер алфавіту +title: Збіги чисел та літер алфавіту challengeType: 1 forumTopicId: 301356 dashedName: match-numbers-and-letters-of-the-alphabet @@ -8,11 +8,11 @@ dashedName: match-numbers-and-letters-of-the-alphabet # --description-- -Використання дефіса (`-`) для пошуку діапазону символів не обмежується літерами. Це також працює і для пошуку діапазону чисел. +Дефіс (`-`) не обмежується лише літерами. Він також працює для пошуку діапазону чисел. -Наприклад, `/[0-5]/` відповідає будь-якому числу від `0` до `5`, включаючи `0` і `5`. +Наприклад, `/[0-5]/` збігається з будь-яким числом від `0` до `5`, включно з `0` та `5`. -Також можливим є поєднання діапазону літер і чисел в одному наборі символів. +В одному наборі символів можливо поєднати діапазон літер та чисел. ```js let jennyStr = "Jenny8675309"; @@ -22,23 +22,23 @@ jennyStr.match(myRegex); # --instructions-- -Створіть регулярний вираз, який відповідає діапазону літер від `h` до `s`, а також діапазону чисел від `2` до `6`. Не забудьте включити відповідні прапорці у регулярному виразі. +Створіть регулярний вираз, який збігається з діапазоном літер від `h` до `s` та діапазоном чисел від `2` до `6`. Не забудьте використати відповідні прапорці у регулярному виразі. # --hints-- -Ваш регулярний вираз `myRegex` повинен збігатися з 17 елементами. +Ваш регулярний вираз `myRegex` має знайти збіги для 17 елементів. ```js assert(result.length == 17); ``` -Ваш регулярний вираз `myRegex` повинен використовувати глобальний прапорець. +Ваш регулярний вираз `myRegex` має використати глобальний прапорець. ```js assert(myRegex.flags.match(/g/).length == 1); ``` -Ваш регулярний вираз `myRegex` повинен використовувати прапорець без урахування регістру. +Ваш регулярний вираз `myRegex` має використати прапорець без урахування регістру. ```js assert(myRegex.flags.match(/i/).length == 1); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-single-character-with-multiple-possibilities.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-single-character-with-multiple-possibilities.md index f8efeef9c59..9a7a350f847 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-single-character-with-multiple-possibilities.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-single-character-with-multiple-possibilities.md @@ -1,6 +1,6 @@ --- id: 587d7db5367417b2b2512b95 -title: Встановлення відповідності одного символу з кількома можливостями +title: Пошук збігів одного символа з різними варіантами challengeType: 1 forumTopicId: 301357 dashedName: match-single-character-with-multiple-possibilities @@ -8,11 +8,11 @@ dashedName: match-single-character-with-multiple-possibilities # --description-- -Ви вивчили як використовувати літеральні шаблони (`/literal/`) і шаблон спеціального символу (`/./`). Це — крайнощі регулярних виразів, де одні мають точні збіги, а інші — збігаються з усім. Є варіанти, які є балансом між двома крайнощами. +Ви дізнались про точні збіги шаблонів (`/literal/`) та байдужий символ (`/./`). Це два кінці регулярних виразів, де один знаходить точний збіг, а другий збігається з усім. Між ними існує й баланс. -Ви можете знайти літерний шаблон з деякою гнучкістю за допомогою character classes. Класи символів дозволяють визначити групу символів, які ви хочете зіставити, розмістивши їх у квадратних (`[` і `]`) дужках. +Ви можете знайти точний збіг з певним відхиленням за допомогою символьних класів. Символьні класи дозволяють визначити групу символів, для яких ви хочете знайти збіги. Для цього їх потрібно розмістити всередині квадратних дужок (`[` та `]`). -Наприклад, ви хочете зіставити `bag`, `big`, і `bug` але не `bog`. Щоб зробити це, ви можете створити регулярний вираз `/b[aiu]g/`. `[aiu]` - це клас символів, який буде співпадати лише з символами `a`, `i`, або `u`. +Наприклад, ви хочете знайти збіги рядків `bag`, `big` та `bug`, але не `bog`. Для цього потрібно створити регулярний вираз `/b[aiu]g/`. `[aiu]` є символьним класом, який збігатиметься лише з символами `a`, `i` або `u`. ```js let bigStr = "big"; @@ -26,13 +26,13 @@ bugStr.match(bgRegex); bogStr.match(bgRegex); ``` -По черзі чотири виклики `match` повернуть значення `["big"]`, `["bag"]`, `["bug"]`, та `null`. +Чотири виклики `match` повернуть значення `["big"]`, `["bag"]`, `["bug"]` та `null` по черзі. # --instructions-- -Використайте клас символів голосних (`a`, `e`, `i`, `o`, `u`) у вашому регулярному виразі `vowelRegex`, щоб знайти усі голосні в рядку `quoteSample`. +Використайте символьний клас до голосних (`a`, `e`, `i`, `o`, `u`) у регулярному виразі `vowelRegex`, щоб знайти всі голосні в рядку `quoteSample`. -**Примітка:** не забудьте вказати голосні як верхнього, так і нижнього регістру. +**Примітка:** знайдіть збіги голосних як верхнього, так і нижнього регістру. # --hints-- @@ -42,19 +42,19 @@ bogStr.match(bgRegex); assert(result.length == 25); ``` -Ваш регулярний вираз `vowelRegex` повинен використовувати клас символів. +Ваш регулярний вираз `vowelRegex` має використати символьний клас. ```js assert(/\[.*\]/.test(vowelRegex.source)); ``` -Ваш регулярний вираз `vowelRegex` повинен використовувати глобальний прапорець. +Ваш регулярний вираз `vowelRegex` має використати глобальний прапорець. ```js assert(vowelRegex.flags.match(/g/).length == 1); ``` -Ваш регулярний вираз `vowelRegex` повинен використовувати прапорець без урахування регістру. +Ваш регулярний вираз `vowelRegex` має використати прапорець без урахування регістру. ```js assert(vowelRegex.flags.match(/i/).length == 1); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-single-characters-not-specified.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-single-characters-not-specified.md index b1b246c1fd5..c8cbc3ea3db 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-single-characters-not-specified.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-single-characters-not-specified.md @@ -20,19 +20,19 @@ dashedName: match-single-characters-not-specified # --hints-- -Регулярний вираз `myRegex` повинен знайти збіги для 9 елементів. +Ваш регулярний вираз `myRegex` повинен знайти збіги для 9 елементів. ```js assert(result.length == 9); ``` -Ваш регулярний вираз `myRegex` повинен використовувати глобальний прапорець. +Ваш регулярний вираз `myRegex` має використати глобальний прапорець. ```js assert(myRegex.flags.match(/g/).length == 1); ``` -Ваш регулярний вираз `myRegex` повинен використовувати прапорець без урахування регістру. +Ваш регулярний вираз `myRegex` має використати прапорець без урахування регістру. ```js assert(myRegex.flags.match(/i/).length == 1); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-whitespace.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-whitespace.md index e9d52724f3c..aa1bbc2e32e 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-whitespace.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/match-whitespace.md @@ -25,7 +25,7 @@ whiteSpace.match(spaceRegex); # --hints-- -Ваш регулярний вираз повинен використовувати глобальний прапорець. +Ваш регулярний вираз має використати глобальний прапорець. ```js assert(countWhiteSpace.global); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/remove-whitespace-from-start-and-end.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/remove-whitespace-from-start-and-end.md index 56f0537e55a..5049cea198c 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/remove-whitespace-from-start-and-end.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/remove-whitespace-from-start-and-end.md @@ -24,7 +24,7 @@ dashedName: remove-whitespace-from-start-and-end assert(result === 'Hello, World!'); ``` -Ви не повинні використовувати метод `String.prototype.trim()` для вирішення завдання. +Не використовуйте метод `String.prototype.trim()` у розв’язку. ```js assert(!code.match(/\.?[\s\S]*?trim/)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/using-the-test-method.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/using-the-test-method.md index 1f5e81b2198..3f533aabac6 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/using-the-test-method.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/using-the-test-method.md @@ -8,11 +8,11 @@ dashedName: using-the-test-method # --description-- -У мовах програмування регулярні вирази використовуються для відповідності частин рядків. Ви створюєте шаблони, які допоможуть зробити цю відповідність. +Регулярні вирази використовують у мовах програмування, щоб знайти збіги рядків. Ви створюєте шаблони, які допоможуть зробити це. -Якщо ви хочете знайти слово `the` у рядку `The dog chased the cat`, то можете використати наступний регулярний вираз: `/the/`. Зверніть увагу на те, що лапки в регулярному виразі не потрібні. +Якщо ви хочете знайти слово `the` у рядку `The dog chased the cat`, то використайте регулярний вираз `/the/`. Зверніть увагу на те, що лапки в регулярному виразі не потрібні. -JavaScript має декілька способів використання регулярних виразів. Один зі способів тестування регулярного виразу – це використання методу `.test()`. Метод `.test()` приймає регулярний вираз, застосовує його до рядка (який розміщений всередині дужок), і видає `true` чи `false`, якщо ваш шаблон знаходить щось або ні. +JavaScript має декілька способів використання регулярних виразів. Один зі способів тестування регулярного виразу — це використання методу `.test()`. Метод `.test()` приймає регулярний вираз, застосовує його до рядка (який розміщений всередині дужок) і повертає `true` або `false`, якщо шаблон знайде щось чи ні. ```js let testStr = "freeCodeCamp"; @@ -20,7 +20,7 @@ let testRegex = /Code/; testRegex.test(testStr); ``` -Метод `test` у цьому разі видає `true`. +Метод `test` поверне `true`. # --instructions-- @@ -28,13 +28,13 @@ testRegex.test(testStr); # --hints-- -Вам потрібно використати `.test()`, щоб перевірити регулярний вираз. +Використайте `.test()`, щоб протестувати регулярний вираз. ```js assert(code.match(/myRegex.test\(\s*myString\s*\)/)); ``` -У результаті ви повинні отримати `true`. +Результат має повернути `true`. ```js assert(result === true); diff --git a/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-25-5-clock.md b/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-25-5-clock.md index c5d1c17febc..c46214466d5 100644 --- a/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-25-5-clock.md +++ b/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-25-5-clock.md @@ -12,7 +12,7 @@ dashedName: build-a-25--5-clock Виконайте історію користувача та пройдіть тести. Використовуйте необхідні вам бібліотеки або API. Оформте за власним стилем. -Ви можете використовувати будь-яке поєднання HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux і jQuery для створення цього проєкту. Слід використовувати frontend framework (наприклад, React), тому що цей розділ присвячений саме їх вивченню. Додаткові технології, що не перераховані вище, не рекомендовані і використовуються на власний ризик. Ми розглядаємо варіант використання інших фреймворк шаблонів для розробки інтерфейсу користувача таких, як Angular та Vue, проте наразі вони не підримуютьcя. Ми візьмемо до уваги і спробуємо виправити всі звіти, що використовують запропонований технологічний стек у цьому проєкті. Вдалого програмування! +Ви можете використовувати будь-яке поєднання HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux і jQuery для створення цього проєкту. Слід використовувати frontend framework (наприклад, React), тому що цей розділ присвячений саме їх вивченню. Додаткові технології, що не перераховані вище, не рекомендовані і використовуються на власний ризик. Ми розглядаємо варіант використання інших фреймворк шаблонів для розробки інтерфейсу користувача таких, як Angular та Vue, проте наразі вони не підримуютьcя. Ми візьмемо до уваги і спробуємо виправити всі звіти, що використовують запропонований технологічний стек у цьому проєкті. Щасливого програмування! **Історія користувача #1:** Я можу побачити елемент з `id="break-label"`, який містить рядок (наприклад, "Break Length"). diff --git a/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-drum-machine.md b/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-drum-machine.md index 3a18c2d0f52..0c698241561 100644 --- a/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-drum-machine.md +++ b/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-drum-machine.md @@ -12,7 +12,7 @@ dashedName: build-a-drum-machine Виконайте історію користувача та пройдіть тести. Використовуйте необхідні вам бібліотеки або API. Оформте за власним стилем. -Ви можете по-різному поєднувати HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux та jQuery для завершення цього проєкту. Слід використовувати frontend framework (наприклад, React), тому що цей розділ присвячений саме їх вивченню. Додаткові технології, що не перераховані вище, не рекомендовані і використовуються на власний ризик. Ми розглядаємо підтримку інших frontend framework, таких як Angular та Vue, але вони наразі не підтримуються. Ми візьмемо до уваги та спробуємо виправити всі звіти з зазначеними проблемами, пов'язані із запропонованою технологічною базою для виконання цього проєкту. Вдалого програмування! +Ви можете по-різному поєднувати HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux та jQuery для завершення цього проєкту. Слід використовувати frontend framework (наприклад, React), тому що цей розділ присвячений саме їх вивченню. Додаткові технології, що не перераховані вище, не рекомендовані і використовуються на власний ризик. Ми розглядаємо підтримку інших frontend framework, таких як Angular та Vue, але вони наразі не підтримуються. Ми візьмемо до уваги та спробуємо виправити всі звіти з зазначеними проблемами, пов'язані із запропонованою технологічною базою для виконання цього проєкту. Щасливого програмування! **Історія користувача #1:** Я маю бачити зовнішній контейнер з відповідним `id="drum-machine"`, який містить всі інші елементи. diff --git a/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-javascript-calculator.md b/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-javascript-calculator.md index 99396c75b89..a3e0924a298 100644 --- a/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-javascript-calculator.md +++ b/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-javascript-calculator.md @@ -12,7 +12,7 @@ dashedName: build-a-javascript-calculator Виконайте історію користувача та пройдіть тести. Використовуйте необхідні вам бібліотеки або API. Оформте за власним стилем. -Для виконання цього проєкту ви можете поєднувати різноманітні ресурси HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux та jQuery. Вам слід користуватися готовими шаблонами розробки користувацького інтерфейсу (як-от React), адже цей розділ присвячений застосуванню саме цих шаблонів. Інші технології та ресурси, що не були вказані вище, не є рекомендованими до використання, але ви можете застосовувати і їх на свій страх і ризик. Ми розглядаємо варіант використання інших frontend frameworks для розробки інтерфейсу користувача таких, як Angular та Vue, проте наразі вони не підримуютьcя. Ми розглянемо та спробуємо вирішити всі звіти про невирішені проблеми, пов'язані із запропонованою технологічною базою для виконання цього проєкту. Вдалого програмування! +Для виконання цього проєкту ви можете поєднувати різноманітні ресурси HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux та jQuery. Вам слід користуватися готовими шаблонами розробки користувацького інтерфейсу (як-от React), адже цей розділ присвячений застосуванню саме цих шаблонів. Інші технології та ресурси, що не були вказані вище, не є рекомендованими до використання, але ви можете застосовувати і їх на свій страх і ризик. Ми розглядаємо варіант використання інших frontend frameworks для розробки інтерфейсу користувача таких, як Angular та Vue, проте наразі вони не підримуютьcя. Ми розглянемо та спробуємо вирішити всі звіти про невирішені проблеми, пов'язані із запропонованою технологічною базою для виконання цього проєкту. Щасливого програмування! **User Story #1:** Калькулятор повинен містити активний елемент інтерфейсу, що позначає `=` (equal sign) із відповідним `id="equals"`. diff --git a/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-markdown-previewer.md b/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-markdown-previewer.md index 610c9979931..6d53fba8075 100644 --- a/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-markdown-previewer.md +++ b/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-markdown-previewer.md @@ -12,7 +12,7 @@ dashedName: build-a-markdown-previewer Виконайте історію користувача та пройдіть тести. Використовуйте необхідні вам бібліотеки або API. Оформте за власним стилем. -Ви можете використовувати різноманітні ресурси HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux та jQuery для того, щоб виконати цей проєкт. Слід використовувати frontend framework (наприклад, React), тому що цей розділ присвячений саме їх вивченню. Інші технології та ресурси, що не були вказані вище, не є рекомендованими до використання, але ви можете застосовувати і їх на свій страх і ризик. Ми розглядаємо варіант використання інших frontend frameworks для розробки інтерфейсу користувача таких, як Angular та Vue, проте наразі вони не підримуютьcя. Ми візьмемо до уваги і спробуємо виправити всі звіти, що використовують запропонований технологічний стек у цьому проєкті. Вдалого програмування! +Ви можете використовувати різноманітні ресурси HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux та jQuery для того, щоб виконати цей проєкт. Слід використовувати frontend framework (наприклад, React), тому що цей розділ присвячений саме їх вивченню. Інші технології та ресурси, що не були вказані вище, не є рекомендованими до використання, але ви можете застосовувати і їх на свій страх і ризик. Ми розглядаємо варіант використання інших frontend frameworks для розробки інтерфейсу користувача таких, як Angular та Vue, проте наразі вони не підримуютьcя. Ми візьмемо до уваги і спробуємо виправити всі звіти, що використовують запропонований технологічний стек у цьому проєкті. Щасливого програмування! **Історія користувача №1:** Я бачу `textarea` елемент з відповідним `id="editor"`. diff --git a/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-random-quote-machine.md b/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-random-quote-machine.md index afe3345fa2c..eeb187685ab 100644 --- a/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-random-quote-machine.md +++ b/curriculum/challenges/ukrainian/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-random-quote-machine.md @@ -12,7 +12,7 @@ dashedName: build-a-random-quote-machine Виконайте історію користувача та пройдіть тести. Використовуйте необхідні вам бібліотеки або API. Оформте за власним стилем. -Ви можете по-різному поєднувати HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux та jQuery для завершення цього проекту. Слід використовувати frontend framework (наприклад, React), тому що цей розділ присвячений саме їх вивченню. Інші технології та ресурси, що не були вказані вище, не рекомендуються до використання, але ви можете застосовувати і їх на ваш розсуд. Ми розглядаємо варіант використання інших frontend frameworks для розробки інтерфейсу користувача таких, як Angular та Vue, проте наразі вони не підримуютьcя. Ми візьмемо до уваги і спробуємо виправити всі звіти, що використовують запропонований технологічний стек у цьому проєкті. Вдалого програмування! +Ви можете по-різному поєднувати HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux та jQuery для завершення цього проекту. Слід використовувати frontend framework (наприклад, React), тому що цей розділ присвячений саме їх вивченню. Інші технології та ресурси, що не були вказані вище, не рекомендуються до використання, але ви можете застосовувати і їх на ваш розсуд. Ми розглядаємо варіант використання інших frontend frameworks для розробки інтерфейсу користувача таких, як Angular та Vue, проте наразі вони не підримуютьcя. Ми візьмемо до уваги і спробуємо виправити всі звіти, що використовують запропонований технологічний стек у цьому проєкті. Щасливого програмування! **Історія користувача #1:** Я бачу оболонковий елемент з відповідним `id="quote-box"`. diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/scientific-computing-with-python-projects/arithmetic-formatter.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/scientific-computing-with-python-projects/arithmetic-formatter.md index ded6f3b29cf..f1696ec41c4 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/scientific-computing-with-python-projects/arithmetic-formatter.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/scientific-computing-with-python-projects/arithmetic-formatter.md @@ -25,7 +25,7 @@ dashedName: arithmetic-formatter ----- ``` -Створіть функцію, яка отримує список рядків з математичними прикладами та послідовно повертає їх у вертикальному вигляді. В разі потреби функція повинна брати другий аргумент. Коли другий аргумент встановлено на `True`, відповіді повинні відображатися. +Створіть функцію, яка отримує список рядків з математичними прикладами та послідовно повертає їх у вертикальному вигляді. В разі потреби функція повинна приймати другий аргумент. Коли другий аргумент встановлено на `True`, відповіді повинні відображатися. ## Наприклад diff --git a/curriculum/challenges/ukrainian/11-machine-learning-with-python/how-neural-networks-work/how-deep-neural-networks-work.md b/curriculum/challenges/ukrainian/11-machine-learning-with-python/how-neural-networks-work/how-deep-neural-networks-work.md index 9f807a322f3..e94a48c48a0 100644 --- a/curriculum/challenges/ukrainian/11-machine-learning-with-python/how-neural-networks-work/how-deep-neural-networks-work.md +++ b/curriculum/challenges/ukrainian/11-machine-learning-with-python/how-neural-networks-work/how-deep-neural-networks-work.md @@ -18,7 +18,7 @@ dashedName: how-deep-neural-networks-work --- -Це більш точно. +Це точніше. --- 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 5588d886aa3..280a75d41c7 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 @@ -16,11 +16,11 @@ dashedName: book-recommendation-engine-using-knn # --instructions-- -У цьому завданні ви створите алгоритм книжкових рекомендацій, використовуючи **K-Nearest Neighbours**. +У цьому завданні ви створите алгоритм книжкових рекомендацій, використовуючи метод **k-найближчих сусідів**. Ви будете використовувати набір даних Book-Crossings. Цей набір даних містить 1,1 млн рейтингів (за шкалою 1-10) 270 000 книжок від 90 000 користувачів. -Після імпортування та очищення даних використайте `NearestNeighbors` з `sklearn.neighbors`, щоб розробити модель, яка показує книжки, схожі на подану книжку. Алгоритм «Найближчого сусіда» вимірює відстань, щоб визначити «близькість» екземплярів. +Після імпортування та очищення даних використайте `NearestNeighbors` з `sklearn.neighbors`, щоб розробити модель, яка показує книжки, схожі на подану книжку. Алгоритм найближчих сусідів вимірює відстань, щоб визначити «близькість» екземплярів. Створіть функцію під назвою `get_recommends`, яка приймає назву книжки (з набору даних) як аргумент та повертає список із 5 подібних книжок з відстанями до аргументу книжки. diff --git a/curriculum/challenges/ukrainian/11-machine-learning-with-python/machine-learning-with-python-projects/cat-and-dog-image-classifier.md b/curriculum/challenges/ukrainian/11-machine-learning-with-python/machine-learning-with-python-projects/cat-and-dog-image-classifier.md index 8c0127e90a7..c174d6b3b32 100644 --- a/curriculum/challenges/ukrainian/11-machine-learning-with-python/machine-learning-with-python-projects/cat-and-dog-image-classifier.md +++ b/curriculum/challenges/ukrainian/11-machine-learning-with-python/machine-learning-with-python-projects/cat-and-dog-image-classifier.md @@ -22,7 +22,7 @@ dashedName: cat-and-dog-image-classifier Перша клітинка коду імпортує необхідні бібліотеки. Друга клітинка коду завантажує дані та встановлює ключові змінні. Третя клітинка — це перше місце, де ви будете писати свій власний код. -Структура файлів набору даних, які завантажуються, виглядає так (ви помітите, що тестова директорія не має піддиректорій, а зображення не позначені): +Структура файлів набору даних, які завантажуються, виглядає так (ви помітите, що тестова директорія не має вкладених директорій, а зображення не позначені): ```py cats_and_dogs @@ -43,7 +43,7 @@ cats_and_dogs Тепер ваша черга! Правильно встановіть кожну зі змінних у цій клітинці. (Вони більше не повинні дорівнювати `None`.) -Створіть генератори зображень для кожного з трьох наборів даних зображень (навчання, перевірка, тест). Використайте `ImageDataGenerator`, щоб прочитати/декодувати зображення та перетворити їх у тензори з плавучою комою. Використайте аргумент `rescale` (жодних інших аргументів наразі), щоб змінити масштаб тензорів від значень від 0 до 255 до значень від 0 до 1. +Створіть генератори зображень для кожного з трьох наборів даних зображень (навчання, перевірка, тест). Використайте `ImageDataGenerator`, щоб прочитати/декодувати зображення та перетворити їх у тензори з плавучою комою. Використайте аргумент `rescale` (жодних інших аргументів наразі), щоб змінити масштаб тензорів зі значень від 0 до 255 на значення від 0 до 1. Для змінних `*_data_gen` використайте метод `flow_from_directory`. Передайте розмір партії, директорію, цільовий розмір (`(IMG_HEIGHT, IMG_WIDTH)`), режим класу та все інше, що потрібно. `test_data_gen` буде найскладнішим. Для `test_data_gen` обов’язково передайте `shuffle=False` в метод `flow_from_directory`. Це гарантує, що кінцеві прогнози залишаться в тому порядку, який очікує наш тест. Для `test_data_gen` також буде корисно спостерігати за структурою директорії. diff --git a/curriculum/challenges/ukrainian/11-machine-learning-with-python/tensorflow/core-learning-algorithms.md b/curriculum/challenges/ukrainian/11-machine-learning-with-python/tensorflow/core-learning-algorithms.md index 5e35072c838..ba72487cd6c 100644 --- a/curriculum/challenges/ukrainian/11-machine-learning-with-python/tensorflow/core-learning-algorithms.md +++ b/curriculum/challenges/ukrainian/11-machine-learning-with-python/tensorflow/core-learning-algorithms.md @@ -14,7 +14,7 @@ dashedName: core-learning-algorithms ## --text-- -Який тип аналізу найкраще підходить для розв’язання наступної задачі? +Який тип аналізу найкраще підходить для розв’язання наданої задачі? У вас є дані про середню температуру у березні за останні 100 років. Використовуючи цю інформацію, потрібно передбачити середню температуру у березні через 5 років. diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md index 48b44f70988..afa7a14d33a 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md @@ -24,7 +24,7 @@ dashedName: build-a-personal-portfolio-webpage 1. Висота вітальної секції повинна дорівнювати висоті вюпорту 1. Навігаційна панель завжди повинна знаходитись у верхній частині вюпорту -Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого кодування! +Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого програмування! **Примітка:** Переконайтеся, що додали `` до HTML для прив'язки з аркушем стилів та застосували CSS diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-product-landing-page-project/build-a-product-landing-page.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-product-landing-page-project/build-a-product-landing-page.md index 9360515f23e..a3fec29b851 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-product-landing-page-project/build-a-product-landing-page.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-product-landing-page-project/build-a-product-landing-page.md @@ -28,7 +28,7 @@ dashedName: build-a-product-landing-page 1. Посадкова сторінка продукту повинна містити щонайменше один медіазапит 1. Посадкова сторінка продукту повинна використовувати CSS flexbox хоча б раз -Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого кодування! +Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого програмування! **Примітка:** Переконайтеся, що додали `` до HTML для прив'язки з аркушем стилів та застосували CSS diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-survey-form-project/build-a-survey-form.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-survey-form-project/build-a-survey-form.md index 3f81fdbfcdc..f69b47ed786 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-survey-form-project/build-a-survey-form.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-survey-form-project/build-a-survey-form.md @@ -29,7 +29,7 @@ dashedName: build-a-survey-form 1. В елементі форми представлено `textarea` для додаткових коментарів 1. В елементі форми представлено кнопку з `id` зі значенням `submit` для відправки всіх введень -Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого кодування! +Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого програмування! **Примітка:** Переконайтеся, що додали `` до HTML для прив'язки з аркушем стилів та застосували CSS diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-technical-documentation-page-project/build-a-technical-documentation-page.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-technical-documentation-page-project/build-a-technical-documentation-page.md index d75096b3a61..dfcbca0ab76 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-technical-documentation-page-project/build-a-technical-documentation-page.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-technical-documentation-page-project/build-a-technical-documentation-page.md @@ -28,7 +28,7 @@ dashedName: build-a-technical-documentation-page 1. На пристроях звичайного розміру (портативний чи настільний комп'ютер) елемент з `id="navbar"` повинен відображатись ліворуч на екрані та завжди бути видимим для користувача 1. Ваша технічна документація повинна використовувати принаймні один медіазапит -Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого кодування! +Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого програмування! **Примітка:** Переконайтеся, що додали `` до HTML для прив'язки з аркушем стилів та застосували CSS diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-tribute-page-project/build-a-tribute-page.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-tribute-page-project/build-a-tribute-page.md index 09676993260..be25b022ad6 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-tribute-page-project/build-a-tribute-page.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-tribute-page-project/build-a-tribute-page.md @@ -22,7 +22,7 @@ dashedName: build-a-tribute-page 1. Ваш `#image` повинен використовувати властивості `max-width` та `height`, щоб змінювати розмір відповідно до ширини батьківського елемента, не перевищуючи початковий розмір 1. Ваш елемент `img` повинен бути зцентрованим відповідно до батьківського елемента -Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого кодування! +Виконайте історію користувача та пройдіть тести, наведені нижче, щоб завершити цей проєкт. Оформте за власним стилем. Щасливого програмування! **Примітка:** Переконайтеся, що додали `` до HTML для прив'язки з аркушем стилів та застосували CSS diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613e275749ebd008e74bb62e.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613e275749ebd008e74bb62e.md index 4367e9d75c9..ee2d8e82419 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613e275749ebd008e74bb62e.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613e275749ebd008e74bb62e.md @@ -19,7 +19,7 @@ img { У цьому прикладі елементи `img` матимуть мінімальну ширину `250px`. І зі збільшенням вікна перегляду, зображення буде відповідно збільшуватися, щоб бути 25 відсотками ширини вікна перегляду. -Scale the image using its `id` as a selector, and setting the `width` to be the maximum of `100px` or `18vw`. +Масштабуйте зображення, використавши його `id` як селектор та встановивши `width` на максимум `100px` або `18vw`. # --hints-- diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148defa9c01520fb9d178a0.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148defa9c01520fb9d178a0.md index bbe8ca94950..074155be118 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148defa9c01520fb9d178a0.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148defa9c01520fb9d178a0.md @@ -7,7 +7,7 @@ dashedName: step-61 # --description-- -While `ul`/`li` elements are great at providing bullets for list items, your radio buttons don't need them. You can control what the bullets look with the `list-style` property. For example you can turn your bullets into circles with the following: +Хоча елементи `ul`/`li` чудово підходять для того, щоб надати маркери списку елементам списку, вони не потрібні радіокнопкам. За допомогою властивості `list-style` можна контролювати, як виглядають маркери списку. Наприклад, ви можете перетворити маркери списку в кружечки: ```css ul { @@ -15,23 +15,23 @@ ul { } ``` -Remove the default styling for the `.answers-list` items by settings its style to `none`, and remove the unordered list padding. +Видаліть стилізацію елементів `.answers-list` за замовчуванням, встановивши стиль на `none`, та видаліть відступ невпорядкованого списку. # --hints-- -You should use the `.answers-list` selector. +Ви повинні використати селектор `.answers-list`. ```js assert.exists(new __helpers.CSSHelp(document).getStyle('.answers-list')); ``` -You should give `.answers-list` a `list-style` of `none`. +Ви повинні надати `.answers-list` властивість `list-style` зі значенням `none`. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.answers-list')?.listStyle, 'none'); ``` -You should give `.answers-list` a `padding` of `0`. +Ви повинні надати `.answers-list` властивість `padding` зі значенням `0`. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.answers-list')?.padding, '0px'); diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa30b9eacea3f48c6300ad.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa30b9eacea3f48c6300ad.md index b596aa2676a..a5952606d6c 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa30b9eacea3f48c6300ad.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa30b9eacea3f48c6300ad.md @@ -29,7 +29,7 @@ assert( assert(document.querySelectorAll('a').length >= 2); ``` -You are missing a closing (`a`) tag after the image. +У вас відсутній кінцевий тег (`a`) після зображення. ```js assert(document.querySelectorAll('a').length === 2); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c6d3f19c4e0a7ba320bb.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c6d3f19c4e0a7ba320bb.md index a4ca612821a..77b3b2f6c6e 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c6d3f19c4e0a7ba320bb.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c6d3f19c4e0a7ba320bb.md @@ -19,7 +19,7 @@ You should call `updateUI()` in your `sortInputArray()` function. assert.match(sortInputArray.toString(), /updateUI\(/); ``` -You should pass `inputValues` as an argument to `updateUI()`. +Передайте `inputValues` як аргумент до `updateUI()`. ```js assert.match(sortInputArray.toString(), /updateUI\(\s*inputValues\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410e1b58efc2c091a13bcd9.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410e1b58efc2c091a13bcd9.md index dde87e14281..a28a2d9ede8 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410e1b58efc2c091a13bcd9.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410e1b58efc2c091a13bcd9.md @@ -17,19 +17,19 @@ You should use a `console.log()` call in your inner loop. assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\(/); ``` -You should pass `array` as the first argument to `console.log()`. +Передайте `array` як перший аргумент до `console.log()`. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\s*\(\s*array\s*,/); ``` -You should pass `array[j]` as the second argument to `console.log()`. +Передайте `array[j]` як другий аргумент до `console.log()`. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\s*\(\s*array\s*,\s*array\s*\[\s*j\s*\]\s*,/); ``` -You should pass `array[j+1]` as the third argument to `console.log()`. +Передайте `array[j+1]` як третій аргумент до `console.log()`. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\s*\(\s*array\s*,\s*array\s*\[\s*j\s*\]\s*,\s*array\s*\[\s*j\s*\+\s*1\s*\]\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410fcd1f731fd17cdb101a7.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410fcd1f731fd17cdb101a7.md index 34a37821ce8..f8b0b5cd8f6 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410fcd1f731fd17cdb101a7.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410fcd1f731fd17cdb101a7.md @@ -19,19 +19,19 @@ You should have a `console.log()` call inside your nested `for` loop. assert.match(code, /const\s+selectionSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*let\s*minIndex\s*=\s*i\s*;?\s*for\s*\(\s*let\s+j\s*=\s*i\s*\+\s*1\s*;\s*j\s*<\s*array\.length\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\(/); ``` -You should pass `array` as the first argument to `console.log()`. +Передайте `array` як перший аргумент до `console.log()`. ```js assert.match(code, /const\s+selectionSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*let\s*minIndex\s*=\s*i\s*;?\s*for\s*\(\s*let\s+j\s*=\s*i\s*\+\s*1\s*;\s*j\s*<\s*array\.length\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\(\s*array\s*,/); ``` -You should pass `array[j]` as the second argument to `console.log()`. +Передайте `array[j]` як другий аргумент до `console.log()`. ```js assert.match(code, /const\s+selectionSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*let\s*minIndex\s*=\s*i\s*;?\s*for\s*\(\s*let\s+j\s*=\s*i\s*\+\s*1\s*;\s*j\s*<\s*array\.length\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\(\s*array\s*,\s*array\s*\[\s*j\s*\]\s*,/); ``` -You should pass `array[minIndex]` as the third argument to `console.log()`. +Передайте `array[minIndex]` як третій аргумент до `console.log()`. ```js assert.match(code, /const\s+selectionSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*let\s*minIndex\s*=\s*i\s*;?\s*for\s*\(\s*let\s+j\s*=\s*i\s*\+\s*1\s*;\s*j\s*<\s*array\.length\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\(\s*array\s*,\s*array\s*\[\s*j\s*\]\s*,\s*array\s*\[\s*minIndex\s*\]\s*\);?/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/641130423e5f512d8972dae1.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/641130423e5f512d8972dae1.md index 62c43548a77..801aa0443a9 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/641130423e5f512d8972dae1.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/641130423e5f512d8972dae1.md @@ -13,7 +13,7 @@ To fix this, you can pass a callback function to the `.sort()` method. The callb # --hints-- -You should pass a callback function to the `.sort()` method. Remember to use arrow syntax. +Передайте функцію зворотного виклику до методу `.sort()`. Remember to use arrow syntax. ```js assert.match(code, /const\s+sortedValues\s*=\s*inputValues\s*\.\s*sort\s*\(\s*\(?.*\)?\s*=>/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a0a3c0a4b32915d26a6e.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a0a3c0a4b32915d26a6e.md index f8b7dab6340..dfd28fb35ae 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a0a3c0a4b32915d26a6e.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a0a3c0a4b32915d26a6e.md @@ -25,7 +25,7 @@ var camperbot; assert.notMatch(code, /console\.log\("Hello World"\);/); ``` -Ви повинні використати ключове слово `var`, щоб оголосити змінну. +Використайте ключове слово `var`, щоб оголосити змінну. ```js assert.match(code, /var/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b365f1cdeb33efc2502e.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b365f1cdeb33efc2502e.md index 27b4a6d649f..e584c58e9a2 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b365f1cdeb33efc2502e.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b365f1cdeb33efc2502e.md @@ -19,25 +19,25 @@ dashedName: step-23 assert.notMatch(code, /var/); ``` -Ви повинні використати ключове слово `let`, щоб оголосити змінну `xp`. +Використайте ключове слово `let`, щоб оголосити змінну `xp`. ```js assert.match(code, /let xp/); ``` -Ви повинні використати ключове слово `let`, щоб оголосити змінну `health`. +Використайте ключове слово `let`, щоб оголосити змінну `health`. ```js assert.match(code, /let health/); ``` -Ви повинні використати ключове слово `let`, щоб оголосити змінну `gold`. +Використайте ключове слово `let`, щоб оголосити змінну `gold`. ```js assert.match(code, /let gold/); ``` -Ви повинні використати ключове слово `let`, щоб оголосити змінну `currentWeapon`. +Використайте ключове слово `let`, щоб оголосити змінну `currentWeapon`. ```js assert.match(code, /let currentWeapon/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md index 371cd44273d..4accb8fca71 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md @@ -17,7 +17,7 @@ myFunction(arg) # --hints-- -Ви повинні передати масив `locations` до виклику `update`. +Передайте масив `locations` до виклику `update`. ```js assert.match(goTown.toString(), /update\(locations\);/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md index 66b1b6ffbe7..2b3bad153ae 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md @@ -27,7 +27,7 @@ assert.match(code, /locations\[/); assert.match(code, /locations\[0\]/); ``` -Ви повинні передати перший об’єкт у масиві `locations` до функції `update`. +Передайте перший об’єкт у масиві `locations` до функції `update`. ```js assert.match(code, /update\(locations\[0\]\);/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c31ec0ec78216a1c36a0.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c31ec0ec78216a1c36a0.md index 97919c007cb..a5e702de2d2 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c31ec0ec78216a1c36a0.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c31ec0ec78216a1c36a0.md @@ -19,7 +19,7 @@ dashedName: step-71 assert.match(code, /locations\[2\]/); ``` -Ви повинні передати третій елемент у масиві `locations` до `update`. +Передайте третій елемент у масиві `locations` до `update`. ```js assert.match(code, /update\(locations\[2\]\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e1dc897df55108bcb5e8.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e1dc897df55108bcb5e8.md index 698a8be12ef..1ccfec0335e 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e1dc897df55108bcb5e8.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e1dc897df55108bcb5e8.md @@ -17,7 +17,7 @@ dashedName: step-114 assert.match(goFight.toString(), /update/); ``` -Ви повинні передати четвертий об’єкт у масиві `locations` до виклику `update`. +Передайте четвертий об’єкт у масиві `locations` до виклику `update`. ```js assert.match(goFight.toString(), /update\(locations\[3\]\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8efb0e3ce826db8daf80f.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8efb0e3ce826db8daf80f.md index 3b6728cb041..0e7ef9ea1b3 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8efb0e3ce826db8daf80f.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8efb0e3ce826db8daf80f.md @@ -17,7 +17,7 @@ dashedName: step-131 assert.match(defeatMonster.toString(), /update/); ``` -Ви повинні передати `locations[4]` як аргумент. +Передайте `locations[4]` як аргумент. ```js assert.match(defeatMonster.toString(), /update\(locations\[4\]\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f35bde1750791f58773f.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f35bde1750791f58773f.md index d4796033c36..ee968c881b7 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f35bde1750791f58773f.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f35bde1750791f58773f.md @@ -11,7 +11,7 @@ dashedName: step-140 # --hints-- -Ви повинні використати ключове слово `function`, щоб оголосити `winGame`. +Використайте ключове слово `function`, щоб оголосити `winGame`. ```js assert.match(code, /function\s+winGame/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63ec3427fc3e9214c9ed2a14.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63ec3427fc3e9214c9ed2a14.md index 3c394ccd2da..9672d752f87 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63ec3427fc3e9214c9ed2a14.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63ec3427fc3e9214c9ed2a14.md @@ -25,7 +25,7 @@ You should use arrow syntax to create an empty callback function. assert.match(code, /\(\s*\)\s*=>\s*\{\s*\}/) ``` -You should pass your empty callback function to the `.forEach` method. +Передайте порожню функцію зворотного виклику до методу `.forEach`. ```js assert.match(code, /products\.forEach\(\s*\(\s*\)\s*=>\s*\{\s*\}\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63eea5cea403a81a68ae493c.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63eea5cea403a81a68ae493c.md index 17c0cc23ca0..1a0eaa85816 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63eea5cea403a81a68ae493c.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63eea5cea403a81a68ae493c.md @@ -27,7 +27,7 @@ const cart = new ShoppingCart(); assert.match(cart.addItem.toString(), /products\.find\(/); ``` -You should pass a callback function to the `.find()` method. +Передайте функцію зворотного виклику до методу `.find()`. ```js const cart = new ShoppingCart(); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63eedebb0ec0231ff1cede1a.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63eedebb0ec0231ff1cede1a.md index 6095cebe02b..abdc68a79e2 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63eedebb0ec0231ff1cede1a.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63eedebb0ec0231ff1cede1a.md @@ -25,7 +25,7 @@ const cart = new ShoppingCart(); assert.match(cart.addItem.toString(), /this\.items\.forEach\(/); ``` -You should pass a callback function to the `.forEach()` method. +Передайте функцію зворотного виклику до методу `.forEach()`. ```js const cart = new ShoppingCart(); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f0224ceb16dc196d2c860a.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f0224ceb16dc196d2c860a.md index 820c0f95b49..cc5268bcd2c 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f0224ceb16dc196d2c860a.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f0224ceb16dc196d2c860a.md @@ -23,7 +23,7 @@ You should call the `getElementsByClassName()` method on the `document` object. assert.match(code, /document\s*\.\s*getElementsByClassName\s*\(/); ``` -You should pass the string `add-to-cart-btn` to the `getElementsByClassName()` method. +Передайте рядок `add-to-cart-btn` до методу `getElementsByClassName()`. ```js assert.match(code, /document\s*\.\s*getElementsByClassName\s*\(\s*('|"|`)add-to-cart-btn\1\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f026d041bc6c1a3d5cba0f.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f026d041bc6c1a3d5cba0f.md index 5b3d4550b7e..f438ec31d20 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f026d041bc6c1a3d5cba0f.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f026d041bc6c1a3d5cba0f.md @@ -31,7 +31,7 @@ You should use the `forEach` method on the array you created. assert.match(code, /\[\s*\.\.\.addToCartBtns\s*\]\s*\.\s*forEach\s*\(/); ``` -You should not pass a callback function to the `forEach` method. +Не передавайте функцію зворотного виклику до методу `forEach`. ```js assert.match(code, /\[\s*\.\.\.addToCartBtns\s*\]\s*\.\s*forEach\s*\(\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f02c6e18773921ba50aa53.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f02c6e18773921ba50aa53.md index d09e2c21ad8..b4a22a87cd8 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f02c6e18773921ba50aa53.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f02c6e18773921ba50aa53.md @@ -27,7 +27,7 @@ const afterCalculateTaxes = code.split('calculateTaxes')[1]; assert.match(afterCalculateTaxes, /return\s*\(\s*\(\s*this\s*\.\s*taxRate\s*\/\s*100\s*\)\s*\*\s*amount\s*\)\s*\.\s*toFixed\(/) ``` -You should pass the `.toFixed()` method the number `2` as an argument. +Передайте число `2` як аргумент до методу `.toFixed()`. ```js const afterCalculateTaxes = code.split('calculateTaxes')[1]; diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f0311f5ea9382388d6124f.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f0311f5ea9382388d6124f.md index 9c53aaf3cb2..dd68f9fa1fb 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f0311f5ea9382388d6124f.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f0311f5ea9382388d6124f.md @@ -13,7 +13,7 @@ Pass your `.toFixed()` call to `parseFloat()`. # --hints-- -You should pass your entire calculation (excluding the `return` statement) to `parseFloat()`. +Передайте свої розрахунки (за винятком інструкції `return`) до `parseFloat()`. ```js const afterCalculateTaxes = code.split('calculateTaxes')[1]; diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f039dbcef7673e4e758fa3.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f039dbcef7673e4e758fa3.md index 2b16b45e456..b894a26088f 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f039dbcef7673e4e758fa3.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-data-structures-by-building-a-shopping-cart/63f039dbcef7673e4e758fa3.md @@ -26,7 +26,7 @@ You should call the `confirm()` function. assert.match(cart.clearCart.toString(), /confirm\s*\(/); ``` -You should pass the string `Are you sure you want to clear all items from your shopping cart?` to the `confirm()` function. +Передайте рядок `Are you sure you want to clear all items from your shopping cart?` до функції `confirm()`. ```js assert.match(cart.clearCart.toString(), /confirm\s*\(\s*('|"|`)Are you sure you want to clear all items from your shopping cart\?\1\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf511b85b6082e54dc1573.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf511b85b6082e54dc1573.md index 89b02f05f89..87dcacfe5c1 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf511b85b6082e54dc1573.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf511b85b6082e54dc1573.md @@ -23,13 +23,13 @@ Your `cleanInputString` should call the `replace` method of `str`. assert.match(cleanInputString.toString(), /str\.replace\(/); ``` -You should pass `regex` as the first argument to `replace`. +Передайте `regex` як перший аргумент до `replace`. ```js assert.match(cleanInputString.toString(), /str\.replace\(\s*regex\s*/); ``` -You should pass `""` as the second argument to `replace`. +Передайте `""` як другий аргумент до `replace`. ```js assert.match(cleanInputString.toString(), /str\.replace\(\s*regex\s*,\s*("|')\1\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf5c438f523a359769106c.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf5c438f523a359769106c.md index ec907dee550..7451f35c37f 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf5c438f523a359769106c.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf5c438f523a359769106c.md @@ -19,7 +19,7 @@ Your `isInvalidInput` function should call the `.match()` method on `str`. assert.match(isInvalidInput.toString(), /str\.match\(/); ``` -You should pass `regex` as the argument to the `.match()` method. +Передайте `regex` як аргумент до методу `.match()`. ```js assert.match(isInvalidInput.toString(), /str\.match\(\s*regex\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c1e0af28078f2dfad9eb3e.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c1e0af28078f2dfad9eb3e.md index 7c17040921d..ea679185113 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c1e0af28078f2dfad9eb3e.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c1e0af28078f2dfad9eb3e.md @@ -23,7 +23,7 @@ Your `targetInputContainer` variable should be set to `document.querySelector()` assert.match(addEntry.toString(), /targetInputContainer\s*=\s*document\.querySelector\(/); ``` -You should pass `targetId` to your `querySelector()` method. +Передайте `targetId` до методу `querySelector()`. ```js assert.match(addEntry.toString(), /targetInputContainer\s*=\s*document\.querySelector\(\s*targetId\s*/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c2164c0df38a382062c4af.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c2164c0df38a382062c4af.md index d39bb26028a..36d3f7095f0 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c2164c0df38a382062c4af.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c2164c0df38a382062c4af.md @@ -15,7 +15,7 @@ This will return a `NodeList` of all the text inputs in the form. You can then a # --hints-- -You should pass the string `input[type="text"]` to the `querySelectorAll()` method. +Передайте рядок `input[type="text"]` до методу `querySelectorAll()`. ```js assert.match(addEntry.toString(), /entryNumber\s*=\s*targetInputContainer\.querySelectorAll\(\s*'input\[type="text"]'\)/) diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21cd2c34541469f5700a9.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21cd2c34541469f5700a9.md index 259788d914e..55385fe8df6 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21cd2c34541469f5700a9.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21cd2c34541469f5700a9.md @@ -15,13 +15,13 @@ For the second argument, pass your `HTMLString` variable. # --hints-- -You should pass the string `beforeend` as the first argument to `insertAdjacentHTML`. +Передайте рядок `beforeend` як перший аргумент до `insertAdjacentHTML`. ```js assert.match(addEntry.toString(), /insertAdjacentHTML\(\s*('|")beforeend\1/); ``` -You should pass your `HTMLString` variable as the second argument to `insertAdjacentHTML`. +Передайте змінну `HTMLString` як другий аргумент до `insertAdjacentHTML`. ```js assert.match(addEntry.toString(), /insertAdjacentHTML\(\s*('|")beforeend\1\s*,\s*HTMLString\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21dea919c8e4adb0df8e8.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21dea919c8e4adb0df8e8.md index 407184bfa37..46b5f996bd1 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21dea919c8e4adb0df8e8.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21dea919c8e4adb0df8e8.md @@ -19,13 +19,13 @@ You should call the `.addEventListener()` method of the `addEntryButton`. assert.match(code, /addEntryButton\.addEventListener\(/); ``` -You should pass `click` as the first argument to the `.addEventListener()` method. +Передайте `click` як перший аргумент до методу `.addEventListener()`. ```js assert.match(code, /addEntryButton\.addEventListener\(\s*('|")click\1\s*/); ``` -You should pass `addEntry` as the second argument to the `.addEventListener()` method. +Передайте `addEntry` як другий аргумент до методу `.addEventListener()`. ```js assert.match(code, /addEntryButton\.addEventListener\(\s*('|")click\1\s*,\s*addEntry\s*/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c8be904ffff922f3c6f8d0.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c8be904ffff922f3c6f8d0.md index ddc5e149715..3d859c4be02 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c8be904ffff922f3c6f8d0.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c8be904ffff922f3c6f8d0.md @@ -19,7 +19,7 @@ Your `getCaloriesFromInputs` function should call your `cleanInputString` functi assert.match(getCaloriesFromInputs.toString(), /cleanInputString\(/); ``` -You should pass `list[i].value` as the parameter for `cleanInputString`. +Передайте `list[i].value` як параметр до `cleanInputString`. ```js assert.match(getCaloriesFromInputs.toString(), /cleanInputString\(\s*list\[i\]\.value\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c8c00bfb671b23f9de4159.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c8c00bfb671b23f9de4159.md index 0d376994188..b1e0b705ed6 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c8c00bfb671b23f9de4159.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c8c00bfb671b23f9de4159.md @@ -23,7 +23,7 @@ You should assign the result of calling `isInvalidInput` to your `invalidInputMa assert.match(getCaloriesFromInputs.toString(), /invalidInputMatch\s*=\s*isInvalidInput\(/); ``` -You should pass `currVal` as the parameter to `isInvalidInput`. +Передайте `currVal` як параметр до `isInvalidInput`. ```js assert.match(getCaloriesFromInputs.toString(), /invalidInputMatch\s*=\s*isInvalidInput\(\s*currVal\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9bce376ca4f09c15a3768.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9bce376ca4f09c15a3768.md index 5313981058c..f230f8bebf9 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9bce376ca4f09c15a3768.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9bce376ca4f09c15a3768.md @@ -25,7 +25,7 @@ After your `if` statement, you should use the addition assignment operator on `c assert.match(getCaloriesFromInputs.toString(), /if.*}\s*calories\s*\+=/s); ``` -You should pass `currVal` to the `Number()` constructor. +Передайте `currVal` до конструктора `Number()`. ```js assert.match(getCaloriesFromInputs.toString(), /Number\(\s*currVal\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e94e9df7d72aed1c24bd.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e94e9df7d72aed1c24bd.md index f9f0cf94947..a0d132fbdb3 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e94e9df7d72aed1c24bd.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e94e9df7d72aed1c24bd.md @@ -25,7 +25,7 @@ You should call the `.remove()` method of the `classList` property. assert.match(calculateCalories.toString(), /output\.classList\.remove\(/); ``` -You should pass `hide` as the argument to the `.remove()` method. +Передайте `hide` як аргумент до методу `.remove()`. ```js assert.match(calculateCalories.toString(), /output\.classList\.remove\(\s*('|")hide\1\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9ea23dbadbf2c2764e3f5.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9ea23dbadbf2c2764e3f5.md index e5f62f01c05..b9ca83fee3a 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9ea23dbadbf2c2764e3f5.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9ea23dbadbf2c2764e3f5.md @@ -19,13 +19,13 @@ You should use the `.addEventListener()` method of your `calorieCounter` element assert.match(code, /calorieCounter\.addEventListener\(/); ``` -You should pass `submit` as the first argument to `.addEventListener()`. +Передайте `submit` як перший аргумент до `.addEventListener()`. ```js assert.match(code, /calorieCounter\.addEventListener\(\s*('|")submit\1\s*/); ``` -You should pass `calculateCalories` as the second argument to `.addEventListener()`. +Передайте `calculateCalories` як другий аргумент до `.addEventListener()`. ```js assert.match(code, /calorieCounter\.addEventListener\(\s*('|")submit\1\s*,\s*calculateCalories\s*/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9f28bda3e3f336e21b6b4.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9f28bda3e3f336e21b6b4.md index c25ae81bb41..afaebb891eb 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9f28bda3e3f336e21b6b4.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9f28bda3e3f336e21b6b4.md @@ -25,7 +25,7 @@ You should call the `.add()` method on the `classList` property of the `output` assert.match(clearForm.toString(), /output\.classList\.add/); ``` -You should pass `hide` as the argument to the `.add()` method. +Передайте `hide` як аргумент до методу `.add()`. ```js assert.match(clearForm.toString(), /output\.classList\.add\(\s*('|")hide\1\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9f2bff625af342023512c.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9f2bff625af342023512c.md index 1e13d749f90..a2d30c54448 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9f2bff625af342023512c.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9f2bff625af342023512c.md @@ -19,13 +19,13 @@ You should add an event listener to the `clearButton` button. assert.match(code, /clearButton\s*\.addEventListener\s*\(/); ``` -You should pass `click` as the first argument to `.addEventListener()`. +Передайте `click` як перший аргумент до `.addEventListener()`. ```js assert.match(code, /clearButton\s*\.addEventListener\s*\(\s*('|"|`)click\1\s*/); ``` -You should pass `clearForm` as the second argument to `.addEventListener()`. +Передайте `clearForm` як другий аргумент до `.addEventListener()`. ```js assert.match(code, /clearButton\s*\.addEventListener\s*\(\s*('|"|`)click\1\s*,\s*clearForm\s*/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642ddfdea4200e313f80a4b6.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642ddfdea4200e313f80a4b6.md index baaba974594..5d09612c1b1 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642ddfdea4200e313f80a4b6.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642ddfdea4200e313f80a4b6.md @@ -31,7 +31,7 @@ You should use the `.createElement()` method of the `document` object. assert.match(code, /document\.createElement\(/); ``` -Ви повинні передати рядок `div` до методу `.createElement()`. +Передайте рядок `div` до методу `.createElement()`. ```js assert.match(code, /document\.createElement\(\s*('|"|`)div\1\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642df32c0c2db433d8b46d46.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642df32c0c2db433d8b46d46.md index a0e5bb768f9..256966e8240 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642df32c0c2db433d8b46d46.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642df32c0c2db433d8b46d46.md @@ -17,7 +17,7 @@ You should access the `.appendChild()` method of the `container` element. assert.match(code, /container\.appendChild\(/); ``` -Ви повинні передати елемент `label` до методу `.appendChild()`. +Передайте елемент `label` до методу `.appendChild()`. ```js assert.match(code, /container\.appendChild\(\s*label\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e0011c45c893845842058.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e0011c45c893845842058.md index 9fde681d416..45c839e7f18 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e0011c45c893845842058.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e0011c45c893845842058.md @@ -25,7 +25,7 @@ You should call the `.fill()` method on your `Array()` constructor. assert.match(code, /const\s*range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\)\.fill\(/); ``` -Ви повинні передати `start` до методу `.fill()`. +Передайте `start` до методу `.fill()`. ```js assert.match(code, /const\s*range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\).fill\(\s*start\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e004130958c3975aa3a4a.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e004130958c3975aa3a4a.md index 8c77dbff00b..1a477de8a27 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e004130958c3975aa3a4a.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e004130958c3975aa3a4a.md @@ -25,7 +25,7 @@ You should chain the `.map()` method to your `.fill()` method. assert.match(code, /const\s*range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\).fill\(\s*start\s*\)\.map\(/); ``` -Ви повинні передати функцію зворотного виклику до `.map()`, використовуючи стрілковий синтаксис. +Передайте функцію зворотного виклику до `.map()`, використовуючи стрілковий синтаксис. ```js assert.match(code, /const\s*range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\).fill\(\s*start\s*\)\.map\(\s*\(.*\)\s*=>/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e02be7845f13b014cd2b0.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e02be7845f13b014cd2b0.md index 0486eaee008..df63f2b00f8 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e02be7845f13b014cd2b0.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e02be7845f13b014cd2b0.md @@ -61,7 +61,7 @@ Your `charRange` function should call your `range` function. assert.match(code, /const\s*charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(/); ``` -Ви повинні передати `start` та `end` як аргументи до виклику `range`. +Передайте `start` та `end` як аргументи до виклику `range`. ```js assert.match(code, /const\s*charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\s*,\s*end\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345b810a6e481e5e326849.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345b810a6e481e5e326849.md index 623fa379d84..2b02aca4528 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345b810a6e481e5e326849.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345b810a6e481e5e326849.md @@ -49,7 +49,7 @@ Your `.map()` callback should return the result of calling `String.fromCharCode( assert.match(code, /const\s*charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\.charCodeAt\(\s*0\s*\)\s*,\s*end\.charCodeAt\(\s*0\s*\)\s*\).map\(\s*\(?\s*code\s*\)?\s*=>\s*String\.fromCharCode\(/); ``` -Ви повинні передати змінну `code` до `String.fromCharCode()`. +You should pass the variable `code` to `String.fromCharCode()`. ```js assert.match(code, /const\s*charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\.charCodeAt\(\s*0\s*\)\s*,\s*end\.charCodeAt\(\s*0\s*\)\s*\).map\(\s*\(?\s*code\s*\)?\s*=>\s*String\.fromCharCode\(\s*code\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345c560591891f64976f7a.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345c560591891f64976f7a.md index f236fb262eb..12b4e490e80 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345c560591891f64976f7a.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345c560591891f64976f7a.md @@ -29,13 +29,13 @@ You should assign a `charRange()` call to your `letters` variable. assert.match(code, /const\s*letters\s*=\s*charRange\(/); ``` -Ви повинні передати `A` як перший аргумент до виклику `charRange()`. +You should pass `A` as the first argument to your `charRange()` call. ```js assert.match(code, /const\s*letters\s*=\s*charRange\(\s*('|"|`)A\1/); ``` -Ви повинні передати `J` як другий аргумент до виклику `charRange()`. +Передайте `J` як другий аргумент до виклику `charRange()`. ```js assert.match(code, /const\s*letters\s*=\s*charRange\(\s*('|"|`)A\1\s*,\s*('|"|`)J\2\s*\)/) diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434750c53db16218f41e6e1.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434750c53db16218f41e6e1.md index 45284f2c18e..60e47796a10 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434750c53db16218f41e6e1.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434750c53db16218f41e6e1.md @@ -19,13 +19,13 @@ You should call your `range()` function. assert.lengthOf(code.match(/range\(/g), 2); ``` -Ви повинні передати `1` як перший аргумент до виклику `range()`. +Передайте `1` як перший аргумент до виклику `range()`. ```js assert.match(code, /range\(\s*1/); ``` -Ви повинні передати `99` як другий аргумент до виклику `range()`. +Передайте `99` як другий аргумент до виклику `range()`. ```js assert.match(code, /range\(\s*1\s*,\s*99\s*\)/); @@ -37,7 +37,7 @@ You should chain the `.forEach()` method to your `range()` call. assert.match(code, /range\(\s*1\s*,\s*99\s*\)\.forEach\(/); ``` -Ви повинні передати функцію зворотного виклику до `.forEach()`, використовуючи стрілковий синтаксис. +Передайте функцію зворотного виклику до `.forEach()`, використовуючи стрілковий синтаксис. ```js assert.match(code, /range\(\s*1\s*,\s*99\s*\)\.forEach\(\s*\(?.*\)?\s*=>/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434759f78ec812264ff8f34.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434759f78ec812264ff8f34.md index c8d29f55a25..5651e1895fb 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434759f78ec812264ff8f34.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6434759f78ec812264ff8f34.md @@ -19,7 +19,7 @@ You should call your `createLabel()` function. assert.match(code, /range\(\s*1\s*,\s*99\s*\)\.forEach\(\s*\(?\s*number\s*\)?\s*=>\s*\{\s*createLabel\(/); ``` -Ви повинні передати `number` до виклику `createLabel()`. +Передайте `number` до виклику `createLabel()`. ```js assert.match(code, /range\(\s*1\s*,\s*99\s*\)\.forEach\(\s*\(?\s*number\s*\)?\s*=>\s*\{\s*createLabel\(/) diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643475e13dc727231acd0f72.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643475e13dc727231acd0f72.md index 10abea4dac6..d02bf6331e8 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643475e13dc727231acd0f72.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643475e13dc727231acd0f72.md @@ -31,7 +31,7 @@ You should call the `.createElement()` method of the `document` object. assert.lengthOf(code.match(/document\.createElement\(/g), 2) ``` -Ви повинні передати рядок `input` до методу `.createElement()`. +Передайте рядок `input` до методу `.createElement()`. ```js assert.match(code, /document\.createElement\(\s*('|"|`)input\1\s*\)/) diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643498328cb52026123e2b91.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643498328cb52026123e2b91.md index ad15dd8a213..911c3299683 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643498328cb52026123e2b91.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/643498328cb52026123e2b91.md @@ -19,7 +19,7 @@ You should call the `.appendChild()` method on your `container` element. assert.lengthOf(code.match(/container\.appendChild\(/g), 2); ``` -Ви повинні передати елемент `input` до методу `.appendChild()`. +Передайте елемент `input` до методу `.appendChild()`. ```js assert.match(code, /container\.appendChild\(\s*input\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64496d80bc174a158c973080.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64496d80bc174a158c973080.md index ffdf4d715e3..0ef54d5b870 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64496d80bc174a158c973080.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64496d80bc174a158c973080.md @@ -23,7 +23,7 @@ You should call your `isEven()` function after your `return` keyword. assert.match(code, /const\s+median\s*=\s*nums\s*=>\s*\{\s*const\s+sorted\s*=\s*nums\.slice\(\s*\)\.sort\(\s*\(\s*a\s*,\s*b\s*\)\s*=>\s*a\s*-\s*b\s*\)\s*\s*;?\s*const\s+length\s*=\s*sorted\.length;?\s*const\s+middle\s*=\s*length\s*\/\s*2\s*-\s*1\s*;?\s*return\s+isEven\(/); ``` -Ви повинні передати змінну `length` до виклику `isEven()`. +Передайте змінну `length` до виклику `isEven()`. ```js assert.match(code, /const\s+median\s*=\s*nums\s*=>\s*\{\s*const\s+sorted\s*=\s*nums\.slice\(\s*\)\.sort\(\s*\(\s*a\s*,\s*b\s*\)\s*=>\s*a\s*-\s*b\s*\)\s*\s*;?\s*const\s+length\s*=\s*sorted\.length;?\s*const\s+middle\s*=\s*length\s*\/\s*2\s*-\s*1\s*;?\s*return\s+isEven\(\s*length\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64497da4062602213ecf32e7.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64497da4062602213ecf32e7.md index d5b98ee4cba..36eaaeddd78 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64497da4062602213ecf32e7.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64497da4062602213ecf32e7.md @@ -49,7 +49,7 @@ You should make your regular expression global. assert.match(code, /const\s+update\s*=\s*\(?\s*event\s*\)?\s*=>\s*\{\s*const\s+element\s*=\s*event\.target;?\s*const\s+value\s*=\s*element\.value\.replace\(\s*\/\\s\/g/); ``` -Ви повинні передати порожній рядок як другий аргумент до методу `.replace()`. +Передайте порожній рядок як другий аргумент до методу `.replace()`. ```js assert.match(code, /const\s+update\s*=\s*\(?\s*event\s*\)?\s*=>\s*\{\s*const\s+element\s*=\s*event\.target;?\s*const\s+value\s*=\s*element\.value\.replace\(\s*\/\\s\/g\s*,\s*('|"|`)\1/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449842c6f6c84261075e4c9.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449842c6f6c84261075e4c9.md index accd0c0ed91..f3f9072506c 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449842c6f6c84261075e4c9.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/6449842c6f6c84261075e4c9.md @@ -43,7 +43,7 @@ You should assign `idToText` the result of calling the `.find()` method on your assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(/); ``` -You should pass a callback function to your `.find()` method. Use arrow syntax. +Передайте функцію зворотного виклику до методу `.find()`. Use arrow syntax. ```js assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?.*\)?\s*=>/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d0e4636e14eae2bb3b992.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d0e4636e14eae2bb3b992.md index 9d0f0b49d65..90d13fb31c5 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d0e4636e14eae2bb3b992.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d0e4636e14eae2bb3b992.md @@ -23,13 +23,13 @@ Your innermost function should return the result of calling `charRange()`. assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\{\s*const\s+inner\s*=\s*\(?\s*character\s*\)?\s*=>\s*\{\s*return\s+idToText\(\s*character\s*\+\s*num\s*\);?\s*};?\s*return\s+inner;?\s*\}\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(/); ``` -Ви повинні передати `character1` як перший аргумент до виклику `charRange()`. +Передайте `character1` як перший аргумент до виклику `charRange()`. ```js assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\{\s*const\s+inner\s*=\s*\(?\s*character\s*\)?\s*=>\s*\{\s*return\s+idToText\(\s*character\s*\+\s*num\s*\);?\s*};?\s*return\s+inner;?\s*\}\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1/); ``` -Ви повинні передати `character2` як другий аргумент до виклику `charRange()`. +Передайте `character2` як другий аргумент до виклику `charRange()`. ```js assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\{\s*const\s+inner\s*=\s*\(?\s*character\s*\)?\s*=>\s*\{\s*return\s+idToText\(\s*character\s*\+\s*num\s*\);?\s*};?\s*return\s+inner;?\s*\}\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1cadf0d96ab0b7e12da4.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1cadf0d96ab0b7e12da4.md index 65f9c678b2b..e60850e9913 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1cadf0d96ab0b7e12da4.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1cadf0d96ab0b7e12da4.md @@ -19,7 +19,7 @@ You should call `elemValue()` in your `.map()` method. assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(/); ``` -Ви повинні передати `num` до виклику `elemValue()`. +Передайте `num` до виклику `elemValue()`. ```js assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1d67f9261fb15a795588.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1d67f9261fb15a795588.md index 2e8bb501723..3afaaa4100e 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1d67f9261fb15a795588.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1d67f9261fb15a795588.md @@ -29,7 +29,7 @@ You should assign the result of calling `.replace()` on `x` to your `rangeExpand assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(/); ``` -Ви повинні передати `rangeRegex` як аргумент до `.replace()`. +Передайте `rangeRegex` як аргумент до `.replace()`. ```js assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1e531042dfb24da1f032.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1e531042dfb24da1f032.md index 1ddbde3769f..74f847c9cea 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1e531042dfb24da1f032.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d1e531042dfb24da1f032.md @@ -13,7 +13,7 @@ The callback function takes a few parameters. The first is the matched string. P # --hints-- -Ви повинні передати стрілкову функцію як другий аргумент до методу `.replace()`. +Передайте стрілкову функцію як другий аргумент до методу `.replace()`. ```js assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(.*\)\s*=>\s*\{\s*\}\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3141790b3cb337dd611a.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3141790b3cb337dd611a.md index 6a57c30c9f4..d8f41a0bb5b 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3141790b3cb337dd611a.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3141790b3cb337dd611a.md @@ -13,25 +13,25 @@ Give your callback function four more parameters to match those capture groups: # --hints-- -Ви повинні передати `char1` як другий аргумент до функції зворотного виклику. +Передайте `char1` як другий аргумент до функції зворотного виклику. ```js assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(\s*match\s*,\s*char1/); ``` -Ви повинні передати `num1` як третій аргумент до функції зворотного виклику. +Передайте `num1` як третій аргумент до функції зворотного виклику. ```js assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(\s*match\s*,\s*char1\s*,\s*num1/); ``` -Ви повинні передати `char2` як четвертий аргумент до функції зворотного виклику. +Передайте `char2` як четвертий аргумент до функції зворотного виклику. ```js assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(\s*match\s*,\s*char1\s*,\s*num1\s*,\s*char2/); ``` -Ви повинні передати `num2` як п’ятий аргумент до функції зворотного виклику. +Передайте `num2` як п’ятий аргумент до функції зворотного виклику. ```js assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(\s*match\s*,\s*char1\s*,\s*num1\s*,\s*char2\s*,\s*num2\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d382c4d70ceb3dba1e830.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d382c4d70ceb3dba1e830.md index 791bcfa4cfd..bb815d0f7a8 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d382c4d70ceb3dba1e830.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d382c4d70ceb3dba1e830.md @@ -23,13 +23,13 @@ Your callback should return the result of calling `rangeFromString()`. assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(\s*match\s*,\s*char1\s*,\s*num1\s*,\s*char2\s*,\s*num2\s*\)\s*=>\s*rangeFromString\(/); ``` -Ви повинні передати `num1` як перший аргумент до виклику `rangeFromString()`. +Передайте `num1` як перший аргумент до виклику `rangeFromString()`. ```js assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(\s*match\s*,\s*char1\s*,\s*num1\s*,\s*char2\s*,\s*num2\s*\)\s*=>\s*rangeFromString\(\s*num1/); ``` -Ви повинні передати `num2` як другий аргумент до виклику `rangeFromString()`. +Передайте `num2` як другий аргумент до виклику `rangeFromString()`. ```js assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(\s*match\s*,\s*char1\s*,\s*num1\s*,\s*char2\s*,\s*num2\s*\)\s*=>\s*rangeFromString\(\s*num1\s*,\s*num2\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d38c326f3c8b54023de38.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d38c326f3c8b54023de38.md index 0820507abb7..8972576ec78 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d38c326f3c8b54023de38.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d38c326f3c8b54023de38.md @@ -17,7 +17,7 @@ You should call your `addCharacters()` function in your `.map()` method. assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(\s*match\s*,\s*char1\s*,\s*num1\s*,\s*char2\s*,\s*num2\s*\)\s*=>\s*rangeFromString\(\s*num1\s*,\s*num2\s*\)\.map\(\s*addCharacters\s*\(\s*/); ``` -Ви повинні передати `char1` як аргумент до виклику `addCharacters()`. +Передайте `char1` як аргумент до виклику `addCharacters()`. ```js assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(\s*match\s*,\s*char1\s*,\s*num1\s*,\s*char2\s*,\s*num2\s*\)\s*=>\s*rangeFromString\(\s*num1\s*,\s*num2\s*\)\.map\(\s*addCharacters\s*\(\s*char1\s*\)\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3b27cd3c56b875256301.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3b27cd3c56b875256301.md index 6cf6cfd411e..907afdbc7f7 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3b27cd3c56b875256301.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3b27cd3c56b875256301.md @@ -29,7 +29,7 @@ You should assign `cellExpanded` the result of calling the `.replace()` method o assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(\s*_match\s*,\s*char1\s*,\s*num1\s*,\s*char2\s*,\s*num2\s*\)\s*=>\s*rangeFromString\(\s*num1\s*,\s*num2\s*\)\.map\(\s*addCharacters\s*\(\s*char1\s*\)\(\s*char2\s*\)\s*\)\s*\);?\s*const\s+cellRegex\s*=\s*\/\[A-J\]\[1-9\]\[0-9\]\?\/(gi|ig);?\s*const\s+cellExpanded\s*=\s*rangeExpanded\.replace\(/); ``` -Ви повинні передати `cellRegex` як перший аргумент до виклику `.replace()`. +Передайте `cellRegex` як перший аргумент до виклику `.replace()`. ```js assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(\s*_match\s*,\s*char1\s*,\s*num1\s*,\s*char2\s*,\s*num2\s*\)\s*=>\s*rangeFromString\(\s*num1\s*,\s*num2\s*\)\.map\(\s*addCharacters\s*\(\s*char1\s*\)\(\s*char2\s*\)\s*\)\s*\);?\s*const\s+cellRegex\s*=\s*\/\[A-J\]\[1-9\]\[0-9\]\?\/(gi|ig);?\s*const\s+cellExpanded\s*=\s*rangeExpanded\.replace\(\s*cellRegex/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3bc75fe0c9b972da3323.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3bc75fe0c9b972da3323.md index ce3f130e65d..020bb796805 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3bc75fe0c9b972da3323.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3bc75fe0c9b972da3323.md @@ -23,7 +23,7 @@ Your callback function should call `idToText()`. assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(\s*_match\s*,\s*char1\s*,\s*num1\s*,\s*char2\s*,\s*num2\s*\)\s*=>\s*rangeFromString\(\s*num1\s*,\s*num2\s*\)\.map\(\s*addCharacters\s*\(\s*char1\s*\)\(\s*char2\s*\)\s*\)\s*\);?\s*const\s+cellRegex\s*=\s*\/\[A-J\]\[1-9\]\[0-9\]\?\/(gi|ig);?\s*const\s+cellExpanded\s*=\s*rangeExpanded\.replace\(\s*cellRegex\s*,\s*\(?\s*match\s*\)?\s*=>\s*idToText\(/); ``` -Ви повинні передати `match` до виклику `idToText()`. +You should pass `match` to your `idToText()` call. ```js assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(\s*_match\s*,\s*char1\s*,\s*num1\s*,\s*char2\s*,\s*num2\s*\)\s*=>\s*rangeFromString\(\s*num1\s*,\s*num2\s*\)\.map\(\s*addCharacters\s*\(\s*char1\s*\)\(\s*char2\s*\)\s*\)\s*\);?\s*const\s+cellRegex\s*=\s*\/\[A-J\]\[1-9\]\[0-9\]\?\/(gi|ig);?\s*const\s+cellExpanded\s*=\s*rangeExpanded\.replace\(\s*cellRegex\s*,\s*\(?\s*match\s*\)?\s*=>\s*idToText\(\s*match\s*/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3da8501e15bcd355ba1d.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3da8501e15bcd355ba1d.md index e539b2fa2f1..4773dbe8f8c 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3da8501e15bcd355ba1d.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3da8501e15bcd355ba1d.md @@ -59,7 +59,7 @@ assert.notMatch(code, /const\s+infixEval\s*=\s*\(\s*str\s*,\s*regex\s*\)\s*=>\s* assert.match(code, /const\s+infixEval\s*=\s*\(\s*str\s*,\s*regex\s*\)\s*=>\s*str\.replace\(/); ``` -Ви повинні передати `regex` як перший аргумент до методу `.replace()`. +Передайте `regex` як перший аргумент до методу `.replace()`. ```js assert.match(code, /const\s+infixEval\s*=\s*\(\s*str\s*,\s*regex\s*\)\s*=>\s*str\.replace\(\s*regex/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3ee7b17ae3bf48610033.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3ee7b17ae3bf48610033.md index 9eb7202b900..f9a657946ac 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3ee7b17ae3bf48610033.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d3ee7b17ae3bf48610033.md @@ -17,13 +17,13 @@ dashedName: step-70 assert.match(code, /const\s+infixEval\s*=\s*\(\s*str\s*,\s*regex\s*\)\s*=>\s*str\.replace\(\s*regex\s*,\s*\(\s*_match\s*,\s*arg1\s*,\s*operator\s*,\s*arg2\s*\)\s*=>\s*infixToFunction\[\s*operator\s*\]\(/); ``` -Ви повинні передати `arg1` як перший аргумент до виклику `infixToFunction[operator]`. +Передайте `arg1` як перший аргумент до виклику `infixToFunction[operator]`. ```js assert.match(code, /const\s+infixEval\s*=\s*\(\s*str\s*,\s*regex\s*\)\s*=>\s*str\.replace\(\s*regex\s*,\s*\(\s*_match\s*,\s*arg1\s*,\s*operator\s*,\s*arg2\s*\)\s*=>\s*infixToFunction\[\s*operator\s*\]\(\s*arg1/); ``` -Ви повинні передати `arg2` як другий аргумент до виклику `infixToFunction[operator]`. +Передайте `arg2` як другий аргумент до виклику `infixToFunction[operator]`. ```js assert.match(code, /const\s+infixEval\s*=\s*\(\s*str\s*,\s*regex\s*\)\s*=>\s*str\.replace\(\s*regex\s*,\s*\(\s*_match\s*,\s*arg1\s*,\s*operator\s*,\s*arg2\s*\)\s*=>\s*infixToFunction\[\s*operator\s*\]\(\s*arg1\s*,\s*arg2\s*\)\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d40c543943ec250039682.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d40c543943ec250039682.md index 5bf48298115..d10698631b8 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d40c543943ec250039682.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d40c543943ec250039682.md @@ -31,13 +31,13 @@ You should assign `str2` the result of calling your `infixEval` function. assert.match(code, /const\s+highPrecedence\s*=\s*\(?\s*str\s*\)?\s*=>\s*{\s*const\s+regex\s*=\s*\/\(\[(?:\\d\.|\.\\d)\]\+\)\(\[(?:\*\\\/|\\\/*)\]\)\(\[(?:\\d\.|\.\\d)\]\+\)\/;?\s*const\s+str2\s*=\s*infixEval\(/); ``` -Ви повинні передати `str` як перший аргумент до виклику `infixEval`. +Передайте `str` як перший аргумент до виклику `infixEval`. ```js assert.match(code, /const\s+highPrecedence\s*=\s*\(?\s*str\s*\)?\s*=>\s*{\s*const\s+regex\s*=\s*\/\(\[(?:\\d\.|\.\\d)\]\+\)\(\[(?:\*\\\/|\\\/*)\]\)\(\[(?:\\d\.|\.\\d)\]\+\)\/;?\s*const\s+str2\s*=\s*infixEval\(\s*str/); ``` -Ви повинні передати `regex` як другий аргумент до виклику `infixEval`. +Передайте `regex` як другий аргумент до виклику `infixEval`. ```js assert.match(code, /const\s+highPrecedence\s*=\s*\(?\s*str\s*\)?\s*=>\s*{\s*const\s+regex\s*=\s*\/\(\[(?:\\d\.|\.\\d)\]\+\)\(\[(?:\*\\\/|\\\/*)\]\)\(\[(?:\\d\.|\.\\d)\]\+\)\/;?\s*const\s+str2\s*=\s*infixEval\(\s*str\s*,\s*regex\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d40fe4b7b50c30c2b4cd8.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d40fe4b7b50c30c2b4cd8.md index aaa50d7cc38..7213f446842 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d40fe4b7b50c30c2b4cd8.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d40fe4b7b50c30c2b4cd8.md @@ -43,7 +43,7 @@ If the ternary condition is false, you should return the result of calling `high assert.match(code, /const\s+highPrecedence\s*=\s*\(?\s*str\s*\)?\s*=>\s*{\s*const\s+regex\s*=\s*\/\(\[(?:\\d\.|\.\\d)\]\+\)\(\[(?:\*\\\/|\\\/*)\]\)\(\[(?:\\d\.|\.\\d)\]\+\)\/;?\s*const\s+str2\s*=\s*infixEval\(\s*str\s*,\s*regex\s*\);?\s*return\s+(?:str\s*===\s*str2|str2\s*===\s*str)\s*\?\s*str\s*:\s*highPrecedence\(/); ``` -Ви повинні передати `str2` до виклику `highPrecedence()`. +Передайте `str2` до виклику `highPrecedence()`. ```js assert.match(code, /const\s+highPrecedence\s*=\s*\(?\s*str\s*\)?\s*=>\s*{\s*const\s+regex\s*=\s*\/\(\[(?:\\d\.|\.\\d)\]\+\)\(\[(?:\*\\\/|\\\/*)\]\)\(\[(?:\\d\.|\.\\d)\]\+\)\/;?\s*const\s+str2\s*=\s*infixEval\(\s*str\s*,\s*regex\s*\);?\s*return\s+(?:str\s*===\s*str2|str2\s*===\s*str)\s*\?\s*str\s*:\s*highPrecedence\(\s*str2\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d423fade4a9c4636acd13.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d423fade4a9c4636acd13.md index 6face2849df..6124c5db6cd 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d423fade4a9c4636acd13.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d423fade4a9c4636acd13.md @@ -29,7 +29,7 @@ You should assign `noHigh` the result of calling `highPrecedence()`. assert.match(code, /const\s+applyFunction\s*=\s*\(?\s*str\s*\)?\s*=>\s*\{\s*const\s+noHigh\s*=\s*highPrecedence\(/); ``` -Ви повинні передати `str` як аргумент до виклику `highPrecedence()`. +Передайте `str` як аргумент до виклику `highPrecedence()`. ```js assert.match(code, /const\s+applyFunction\s*=\s*\(?\s*str\s*\)?\s*=>\s*\{\s*const\s+noHigh\s*=\s*highPrecedence\(\s*str\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d43587d926bc5b6cb2e50.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d43587d926bc5b6cb2e50.md index 08dd9168c2c..4e079d6e7c0 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d43587d926bc5b6cb2e50.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d43587d926bc5b6cb2e50.md @@ -29,13 +29,13 @@ You should assign `str2` the result of calling `infixEval()`. assert.match(code, /const\s+applyFunction\s*=\s*\(?\s*str\s*\)?\s*=>\s*\{\s*const\s+noHigh\s*=\s*highPrecedence\(\s*str\s*\);?\s*const\s+infix\s*=\s*\/\(\[(?:\\d\.|\.\\d)\]\+\)\(\[(?:\+-|-\+)\]\)\(\[(?:\\d\.|\.\\d)\]\+\)\/;?\s*const\s+str2\s*=\s*infixEval\(/); ``` -Ви повинні передати `noHigh` як перший аргумент до `infixEval()`. +Передайте `noHigh` як перший аргумент до `infixEval()`. ```js assert.match(code, /const\s+applyFunction\s*=\s*\(?\s*str\s*\)?\s*=>\s*\{\s*const\s+noHigh\s*=\s*highPrecedence\(\s*str\s*\);?\s*const\s+infix\s*=\s*\/\(\[(?:\\d\.|\.\\d)\]\+\)\(\[(?:\+-|-\+)\]\)\(\[(?:\\d\.|\.\\d)\]\+\)\/;?\s*const\s+str2\s*=\s*infixEval\(\s*noHigh/); ``` -Ви повинні передати `infix` як другий аргумент до `infixEval()`. +Передайте `infix` як другий аргумент до `infixEval()`. ```js assert.match(code, /const\s+applyFunction\s*=\s*\(?\s*str\s*\)?\s*=>\s*\{\s*const\s+noHigh\s*=\s*highPrecedence\(\s*str\s*\);?\s*const\s+infix\s*=\s*\/\(\[(?:\\d\.|\.\\d)\]\+\)\(\[(?:\+-|-\+)\]\)\(\[(?:\\d\.|\.\\d)\]\+\)\/;?\s*const\s+str2\s*=\s*infixEval\(\s*noHigh\s*\,\s*infix\s*\);?/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d45b739da5ecbf830c108.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d45b739da5ecbf830c108.md index c857bc3030c..2f79b430c8e 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d45b739da5ecbf830c108.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d45b739da5ecbf830c108.md @@ -17,13 +17,13 @@ Your `apply` function should call the `spreadsheetFunctions[fn.toLowerCase()]` f assert.match(code, /const\s+applyFunction\s*=\s*\(?\s*str\s*\)?\s*=>\s*\{\s*const\s+noHigh\s*=\s*highPrecedence\(\s*str\s*\);?\s*const\s+infix\s*=\s*\/\(\[(?:\\d\.|\.\\d)\]\+\)\(\[(?:\+-|-\+)\]\)\(\[(?:\\d\.|\.\\d)\]\+\)\/;?\s*const\s+str2\s*=\s*infixEval\(\s*noHigh\s*\,\s*infix\s*\);?\s*const\s+functionCall\s*=\s*\/\(\[a-z\]\*\)\\\(\(\[0-9\., \]\*\)\\\)\(\?!\.\*\\\(\)\/i;?\s*const\s+toNumberList\s*=\s*\(?\s*args\s*\)?\s*=>\s*args\.split\(\s*('|"|`),\1\s*\)\.map\(\s*parseFloat\s*\);?\s*const\s+apply\s*=\s*\(\s*fn\s*,\s*args\s*\)\s*=>\s*spreadsheetFunctions\[fn\.toLowerCase\(\)\]\(/); ``` -You should pass a `toNumberList()` call to your `spreadsheetFunctions[fn.toLowerCase()]` call. +Передайте виклик `toNumberList()` до виклику `spreadsheetFunctions[fn.toLowerCase()]`. ```js assert.match(code, /const\s+applyFunction\s*=\s*\(?\s*str\s*\)?\s*=>\s*\{\s*const\s+noHigh\s*=\s*highPrecedence\(\s*str\s*\);?\s*const\s+infix\s*=\s*\/\(\[(?:\\d\.|\.\\d)\]\+\)\(\[(?:\+-|-\+)\]\)\(\[(?:\\d\.|\.\\d)\]\+\)\/;?\s*const\s+str2\s*=\s*infixEval\(\s*noHigh\s*\,\s*infix\s*\);?\s*const\s+functionCall\s*=\s*\/\(\[a-z\]\*\)\\\(\(\[0-9\., \]\*\)\\\)\(\?!\.\*\\\(\)\/i;?\s*const\s+toNumberList\s*=\s*\(?\s*args\s*\)?\s*=>\s*args\.split\(\s*('|"|`),\1\s*\)\.map\(\s*parseFloat\s*\);?\s*const\s+apply\s*=\s*\(\s*fn\s*,\s*args\s*\)\s*=>\s*spreadsheetFunctions\[fn\.toLowerCase\(\)\]\(\s*toNumberList\(/); ``` -Ви повинні передати `args` до виклику `toNumberList()`. +Передайте `args` до виклику `toNumberList()`. ```js assert.match(code, /const\s+applyFunction\s*=\s*\(?\s*str\s*\)?\s*=>\s*\{\s*const\s+noHigh\s*=\s*highPrecedence\(\s*str\s*\);?\s*const\s+infix\s*=\s*\/\(\[(?:\\d\.|\.\\d)\]\+\)\(\[(?:\+-|-\+)\]\)\(\[(?:\\d\.|\.\\d)\]\+\)\/;?\s*const\s+str2\s*=\s*infixEval\(\s*noHigh\s*\,\s*infix\s*\);?\s*const\s+functionCall\s*=\s*\/\(\[a-z\]\*\)\\\(\(\[0-9\., \]\*\)\\\)\(\?!\.\*\\\(\)\/i;?\s*const\s+toNumberList\s*=\s*\(?\s*args\s*\)?\s*=>\s*args\.split\(\s*('|"|`),\1\s*\)\.map\(\s*parseFloat\s*\);?\s*const\s+apply\s*=\s*\(\s*fn\s*,\s*args\s*\)\s*=>\s*spreadsheetFunctions\[fn\.toLowerCase\(\)\]\(\s*toNumberList\(\s*args\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d45ee725632cca2555146.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d45ee725632cca2555146.md index 3be5dc3f96e..84e6b73e87a 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d45ee725632cca2555146.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d45ee725632cca2555146.md @@ -17,7 +17,7 @@ Now your `applyFunction` needs to return a result. Return the result of calling assert.match(code, /const\s+applyFunction\s*=\s*\(?\s*str\s*\)?\s*=>\s*\{\s*const\s+noHigh\s*=\s*highPrecedence\(\s*str\s*\);?\s*const\s+infix\s*=\s*\/\(\[(?:\\d\.|\.\\d)\]\+\)\(\[(?:\+-|-\+)\]\)\(\[(?:\\d\.|\.\\d)\]\+\)\/;?\s*const\s+str2\s*=\s*infixEval\(\s*noHigh\s*\,\s*infix\s*\);?\s*const\s+functionCall\s*=\s*\/\(\[a-z\]\*\)\\\(\(\[0-9\., \]\*\)\\\)\(\?!\.\*\\\(\)\/i;?\s*const\s+toNumberList\s*=\s*\(?\s*args\s*\)?\s*=>\s*args\.split\(\s*('|"|`),\1\s*\)\.map\(\s*parseFloat\s*\);?\s*const\s+apply\s*=\s*\(\s*fn\s*,\s*args\s*\)\s*=>\s*spreadsheetFunctions\[fn\.toLowerCase\(\)\]\(\s*toNumberList\(\s*args\s*\)\);?\s*return\s+str2\.replace\(/); ``` -Ви повинні передати `functionCall` як перший аргумент до виклику `.replace()`. +Передайте `functionCall` як перший аргумент до виклику `.replace()`. ```js assert.match(code, /const\s+applyFunction\s*=\s*\(?\s*str\s*\)?\s*=>\s*\{\s*const\s+noHigh\s*=\s*highPrecedence\(\s*str\s*\);?\s*const\s+infix\s*=\s*\/\(\[(?:\\d\.|\.\\d)\]\+\)\(\[(?:\+-|-\+)\]\)\(\[(?:\\d\.|\.\\d)\]\+\)\/;?\s*const\s+str2\s*=\s*infixEval\(\s*noHigh\s*\,\s*infix\s*\);?\s*const\s+functionCall\s*=\s*\/\(\[a-z\]\*\)\\\(\(\[0-9\., \]\*\)\\\)\(\?!\.\*\\\(\)\/i;?\s*const\s+toNumberList\s*=\s*\(?\s*args\s*\)?\s*=>\s*args\.split\(\s*('|"|`),\1\s*\)\.map\(\s*parseFloat\s*\);?\s*const\s+apply\s*=\s*\(\s*fn\s*,\s*args\s*\)\s*=>\s*spreadsheetFunctions\[fn\.toLowerCase\(\)\]\(\s*toNumberList\(\s*args\s*\)\);?\s*return\s+str2\.replace\(\s*functionCall/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4626420eeecd51f241c2.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4626420eeecd51f241c2.md index 073eb2b7f43..64c62d9c038 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4626420eeecd51f241c2.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4626420eeecd51f241c2.md @@ -43,7 +43,7 @@ assert.notMatch(code, /const\s+applyFunction\s*=\s*\(?\s*str\s*\)?\s*=>\s*\{\s*c assert.match(code, /const\s+applyFunction\s*=\s*\(?\s*str\s*\)?\s*=>\s*\{\s*const\s+noHigh\s*=\s*highPrecedence\(\s*str\s*\);?\s*const\s+infix\s*=\s*\/\(\[(?:\\d\.|\.\\d)\]\+\)\(\[(?:\+-|-\+)\]\)\(\[(?:\\d\.|\.\\d)\]\+\)\/;?\s*const\s+str2\s*=\s*infixEval\(\s*noHigh\s*\,\s*infix\s*\);?\s*const\s+functionCall\s*=\s*\/\(\[a-z\]\*\)\\\(\(\[0-9\., \]\*\)\\\)\(\?!\.\*\\\(\)\/i;?\s*const\s+toNumberList\s*=\s*\(?\s*args\s*\)?\s*=>\s*args\.split\(\s*('|"|`),\1\s*\)\.map\(\s*parseFloat\s*\);?\s*const\s+apply\s*=\s*\(\s*fn\s*,\s*args\s*\)\s*=>\s*spreadsheetFunctions\[fn\.toLowerCase\(\)\]\(\s*toNumberList\(\s*args\s*\)\);?\s*return\s+str2\.replace\(\s*functionCall\s*,\s*\(\s*match\s*,\s*fn\s*,\s*args\s*\)\s*=>\s*spreadsheetFunctions\.hasOwnProperty\(/); ``` -Ви повинні передати `fn` до методу `.hasOwnProperty()`. +Передайте `fn` до методу `.hasOwnProperty()`. ```js assert.match(code, /const\s+applyFunction\s*=\s*\(?\s*str\s*\)?\s*=>\s*\{\s*const\s+noHigh\s*=\s*highPrecedence\(\s*str\s*\);?\s*const\s+infix\s*=\s*\/\(\[(?:\\d\.|\.\\d)\]\+\)\(\[(?:\+-|-\+)\]\)\(\[(?:\\d\.|\.\\d)\]\+\)\/;?\s*const\s+str2\s*=\s*infixEval\(\s*noHigh\s*\,\s*infix\s*\);?\s*const\s+functionCall\s*=\s*\/\(\[a-z\]\*\)\\\(\(\[0-9\., \]\*\)\\\)\(\?!\.\*\\\(\)\/i;?\s*const\s+toNumberList\s*=\s*\(?\s*args\s*\)?\s*=>\s*args\.split\(\s*('|"|`),\1\s*\)\.map\(\s*parseFloat\s*\);?\s*const\s+apply\s*=\s*\(\s*fn\s*,\s*args\s*\)\s*=>\s*spreadsheetFunctions\[fn\.toLowerCase\(\)\]\(\s*toNumberList\(\s*args\s*\)\);?\s*return\s+str2\.replace\(\s*functionCall\s*,\s*\(\s*match\s*,\s*fn\s*,\s*args\s*\)\s*=>\s*spreadsheetFunctions\.hasOwnProperty\(fn/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d467c6994f4ce0dc416a4.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d467c6994f4ce0dc416a4.md index a29fd363263..c18564a26c0 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d467c6994f4ce0dc416a4.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d467c6994f4ce0dc416a4.md @@ -23,13 +23,13 @@ If the ternary condition is true, your callback function should return the resul assert.match(code, /const\s+applyFunction\s*=\s*\(?\s*str\s*\)?\s*=>\s*\{\s*const\s+noHigh\s*=\s*highPrecedence\(\s*str\s*\);?\s*const\s+infix\s*=\s*\/\(\[(?:\\d\.|\.\\d)\]\+\)\(\[(?:\+-|-\+)\]\)\(\[(?:\\d\.|\.\\d)\]\+\)\/;?\s*const\s+str2\s*=\s*infixEval\(\s*noHigh\s*\,\s*infix\s*\);?\s*const\s+functionCall\s*=\s*\/\(\[a-z\]\*\)\\\(\(\[0-9\., \]\*\)\\\)\(\?!\.\*\\\(\)\/i;?\s*const\s+toNumberList\s*=\s*\(?\s*args\s*\)?\s*=>\s*args\.split\(\s*('|"|`),\1\s*\)\.map\(\s*parseFloat\s*\);?\s*const\s+apply\s*=\s*\(\s*fn\s*,\s*args\s*\)\s*=>\s*spreadsheetFunctions\[fn\.toLowerCase\(\)\]\(\s*toNumberList\(\s*args\s*\)\);?\s*return\s+str2\.replace\(\s*functionCall\s*,\s*\(\s*match\s*,\s*fn\s*,\s*args\s*\)\s*=>\s*spreadsheetFunctions\.hasOwnProperty\(fn\.toLowerCase\(\s*\)\s*\)\s*\?\s*apply\(/); ``` -Ви повинні передати `fn` як перший аргумент до виклику `apply()`. +Передайте `fn` як перший аргумент до виклику `apply()`. ```js assert.match(code, /const\s+applyFunction\s*=\s*\(?\s*str\s*\)?\s*=>\s*\{\s*const\s+noHigh\s*=\s*highPrecedence\(\s*str\s*\);?\s*const\s+infix\s*=\s*\/\(\[(?:\\d\.|\.\\d)\]\+\)\(\[(?:\+-|-\+)\]\)\(\[(?:\\d\.|\.\\d)\]\+\)\/;?\s*const\s+str2\s*=\s*infixEval\(\s*noHigh\s*\,\s*infix\s*\);?\s*const\s+functionCall\s*=\s*\/\(\[a-z\]\*\)\\\(\(\[0-9\., \]\*\)\\\)\(\?!\.\*\\\(\)\/i;?\s*const\s+toNumberList\s*=\s*\(?\s*args\s*\)?\s*=>\s*args\.split\(\s*('|"|`),\1\s*\)\.map\(\s*parseFloat\s*\);?\s*const\s+apply\s*=\s*\(\s*fn\s*,\s*args\s*\)\s*=>\s*spreadsheetFunctions\[fn\.toLowerCase\(\)\]\(\s*toNumberList\(\s*args\s*\)\);?\s*return\s+str2\.replace\(\s*functionCall\s*,\s*\(\s*match\s*,\s*fn\s*,\s*args\s*\)\s*=>\s*spreadsheetFunctions\.hasOwnProperty\(fn\.toLowerCase\(\s*\)\s*\)\s*\?\s*apply\(\s*fn/); ``` -Ви повинні передати `args` як другий аргумент до виклику `apply()`. +Передайте `args` як другий аргумент до виклику `apply()`. ```js assert.match(code, /const\s+applyFunction\s*=\s*\(?\s*str\s*\)?\s*=>\s*\{\s*const\s+noHigh\s*=\s*highPrecedence\(\s*str\s*\);?\s*const\s+infix\s*=\s*\/\(\[(?:\\d\.|\.\\d)\]\+\)\(\[(?:\+-|-\+)\]\)\(\[(?:\\d\.|\.\\d)\]\+\)\/;?\s*const\s+str2\s*=\s*infixEval\(\s*noHigh\s*\,\s*infix\s*\);?\s*const\s+functionCall\s*=\s*\/\(\[a-z\]\*\)\\\(\(\[0-9\., \]\*\)\\\)\(\?!\.\*\\\(\)\/i;?\s*const\s+toNumberList\s*=\s*\(?\s*args\s*\)?\s*=>\s*args\.split\(\s*('|"|`),\1\s*\)\.map\(\s*parseFloat\s*\);?\s*const\s+apply\s*=\s*\(\s*fn\s*,\s*args\s*\)\s*=>\s*spreadsheetFunctions\[fn\.toLowerCase\(\)\]\(\s*toNumberList\(\s*args\s*\)\);?\s*return\s+str2\.replace\(\s*functionCall\s*,\s*\(\s*match\s*,\s*fn\s*,\s*args\s*\)\s*=>\s*spreadsheetFunctions\.hasOwnProperty\(fn\.toLowerCase\(\s*\)\s*\)\s*\?\s*apply\(\s*fn\s*,\s*args\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d46c03e7d02cecb30f021.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d46c03e7d02cecb30f021.md index 8d6a0c70d73..e20b221e40f 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d46c03e7d02cecb30f021.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d46c03e7d02cecb30f021.md @@ -29,7 +29,7 @@ You should assign the `functionExpanded` variable the result of calling your `ap assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(\s*_match\s*,\s*char1\s*,\s*num1\s*,\s*char2\s*,\s*num2\s*\)\s*=>\s*rangeFromString\(\s*num1\s*,\s*num2\s*\)\.map\(\s*addCharacters\s*\(\s*char1\s*\)\(\s*char2\s*\)\s*\)\s*\);?\s*const\s+cellRegex\s*=\s*\/\[A-J\]\[1-9\]\[0-9\]\?\/(gi|ig);?\s*const\s+cellExpanded\s*=\s*rangeExpanded\.replace\(\s*cellRegex\s*,\s*\(?\s*match\s*\)?\s*=>\s*idToText\(\s*match\.toUpperCase\(\)\s*\)\);?\s*(?:const|let|var)\s+functionExpanded\s*=\s*applyFunction\(/); ``` -Ви повинні передати `cellExpanded` до виклику `applyFunction`. +Передайте `cellExpanded` до виклику `applyFunction`. ```js assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(\s*_match\s*,\s*char1\s*,\s*num1\s*,\s*char2\s*,\s*num2\s*\)\s*=>\s*rangeFromString\(\s*num1\s*,\s*num2\s*\)\.map\(\s*addCharacters\s*\(\s*char1\s*\)\(\s*char2\s*\)\s*\)\s*\);?\s*const\s+cellRegex\s*=\s*\/\[A-J\]\[1-9\]\[0-9\]\?\/(gi|ig);?\s*const\s+cellExpanded\s*=\s*rangeExpanded\.replace\(\s*cellRegex\s*,\s*\(?\s*match\s*\)?\s*=>\s*idToText\(\s*match\.toUpperCase\(\)\s*\)\);?\s*(?:const|let|var)\s+functionExpanded\s*=\s*applyFunction\(\s*cellExpanded\s*\);?/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4717a689e1cfa232e357.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4717a689e1cfa232e357.md index b3715065be3..b3c0906a6e0 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4717a689e1cfa232e357.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4717a689e1cfa232e357.md @@ -43,13 +43,13 @@ If the ternary condition is false, your `evalFormula()` should return the result assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(\s*_match\s*,\s*char1\s*,\s*num1\s*,\s*char2\s*,\s*num2\s*\)\s*=>\s*rangeFromString\(\s*num1\s*,\s*num2\s*\)\.map\(\s*addCharacters\s*\(\s*char1\s*\)\(\s*char2\s*\)\s*\)\s*\);?\s*const\s+cellRegex\s*=\s*\/\[A-J\]\[1-9\]\[0-9\]\?\/(gi|ig);?\s*const\s+cellExpanded\s*=\s*rangeExpanded\.replace\(\s*cellRegex\s*,\s*\(?\s*match\s*\)?\s*=>\s*idToText\(\s*match\.toUpperCase\(\)\s*\)\);?\s*(?:const|let|var)\s+functionExpanded\s*=\s*applyFunction\(\s*cellExpanded\s*\);?\s*return\s*(?:functionExpanded\s*===\s*x|x\s*===\s*functionExpanded)\s*\?\s*functionExpanded\s*:\s*evalFormula\(/); ``` -Ви повинні передати `functionExpanded` як перший аргумент до виклику `evalFormula()`. +Передайте `functionExpanded` як перший аргумент до виклику `evalFormula()`. ```js assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(\s*_match\s*,\s*char1\s*,\s*num1\s*,\s*char2\s*,\s*num2\s*\)\s*=>\s*rangeFromString\(\s*num1\s*,\s*num2\s*\)\.map\(\s*addCharacters\s*\(\s*char1\s*\)\(\s*char2\s*\)\s*\)\s*\);?\s*const\s+cellRegex\s*=\s*\/\[A-J\]\[1-9\]\[0-9\]\?\/(gi|ig);?\s*const\s+cellExpanded\s*=\s*rangeExpanded\.replace\(\s*cellRegex\s*,\s*\(?\s*match\s*\)?\s*=>\s*idToText\(\s*match\.toUpperCase\(\)\s*\)\);?\s*(?:const|let|var)\s+functionExpanded\s*=\s*applyFunction\(\s*cellExpanded\s*\);?\s*return\s*(?:functionExpanded\s*===\s*x|x\s*===\s*functionExpanded)\s*\?\s*functionExpanded\s*:\s*evalFormula\(\s*functionExpanded/); ``` -Ви повинні передати `cells` як другий аргумент до виклику `evalFormula()`. +Передайте `cells` як другий аргумент до виклику `evalFormula()`. ```js assert.match(code, /const\s*evalFormula\s*=\s*\(\s*x\s*,\s*cells\s*\)\s*=>\s*{\s*const\s+idToText\s*=\s*\(?\s*id\s*\)?\s*=>\s*cells\.find\(\s*\(?\s*cell\s*\)?\s*=>\s*(?:cell\.id\s*===\s*id|id\s*===\s*cell\.id)\s*\)\.value;?\s*const\s+rangeRegex\s*=\s*\/\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\):\(\[A-J\]\)\(\[1-9\]\[0-9\]\?\)\/(gi|ig);?\s*const\s+rangeFromString\s*=\s*\(\s*num1\s*,\s*num2\s*\)\s*=>\s*range\(\s*parseInt\(\s*num1\s*\)\s*,\s*parseInt\(\s*num2\s*\)\s*\);?\s*const\s+elemValue\s*=\s*\(?\s*num\s*\)?\s*=>\s*\(?\s*character\s*\)?\s*=>\s*idToText\(\s*character\s*\+\s*num\s*\);?\s*const\s+addCharacters\s*=\s*\(?\s*character1\s*\)?\s*=>\s*\(?\s*character2\s*\)?\s*=>\s*\(?\s*num\s*\)?\s*=>\s*charRange\(\s*character1\s*,\s*character2\s*\)\.map\(\s*elemValue\(\s*num\s*\)\s*\);?\s*const\s+rangeExpanded\s*=\s*x\.replace\(\s*rangeRegex\s*,\s*\(\s*_match\s*,\s*char1\s*,\s*num1\s*,\s*char2\s*,\s*num2\s*\)\s*=>\s*rangeFromString\(\s*num1\s*,\s*num2\s*\)\.map\(\s*addCharacters\s*\(\s*char1\s*\)\(\s*char2\s*\)\s*\)\s*\);?\s*const\s+cellRegex\s*=\s*\/\[A-J\]\[1-9\]\[0-9\]\?\/(gi|ig);?\s*const\s+cellExpanded\s*=\s*rangeExpanded\.replace\(\s*cellRegex\s*,\s*\(?\s*match\s*\)?\s*=>\s*idToText\(\s*match\.toUpperCase\(\)\s*\)\);?\s*(?:const|let|var)\s+functionExpanded\s*=\s*applyFunction\(\s*cellExpanded\s*\);?\s*return\s*(?:functionExpanded\s*===\s*x|x\s*===\s*functionExpanded)\s*\?\s*functionExpanded\s*:\s*evalFormula\(\s*functionExpanded\s*,\s*cells\s*\);?/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d47c8f58107d10f1e5106.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d47c8f58107d10f1e5106.md index d0d98bfed27..4fbade3dad7 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d47c8f58107d10f1e5106.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d47c8f58107d10f1e5106.md @@ -11,7 +11,7 @@ The first argument for your `evalFormula` call needs to be the contents of the c # --hints-- -Ви повинні передати `value` як перший аргумент до виклику `evalFormula()`. +Передайте `value` як перший аргумент до виклику `evalFormula()`. ```js assert.match(code, /const\s+update\s*=\s*\(?\s*event\s*\)?\s*=>\s*\{\s*const\s+element\s*=\s*event\.target;?\s*const\s+value\s*=\s*element\.value\.replace\(\s*\/\\s\/g\s*,\s*('|"|`)\1\s*\);?\s*if\s*\(\s*(!value\.includes\(\s*element\.id\s*\)\s*&&\s*(?:value\[0\]\s*===\s*('|"|`)=\3|value\.charAt\(0\)\s*===\s*('|"|`)=\4|value\.startsWith\(('|"|`)=\5\))|(?:value\[0\]\s*===\s*('|"|`)=\6|value\.charAt\(0\)\s*===\s*('|"|`)=\7|value\.startsWith\(('|"|`)=\8\))\s*\|\|\s*!value\.includes\(\s*element\.id\s*\))\s*\)\s*\{\s*element\.value\s*=\s*evalFormula\(\s*value/); @@ -23,7 +23,7 @@ You should call the `.slice()` method on the `value` argument. assert.match(code, /const\s+update\s*=\s*\(?\s*event\s*\)?\s*=>\s*\{\s*const\s+element\s*=\s*event\.target;?\s*const\s+value\s*=\s*element\.value\.replace\(\s*\/\\s\/g\s*,\s*('|"|`)\1\s*\);?\s*if\s*\(\s*(!value\.includes\(\s*element\.id\s*\)\s*&&\s*(?:value\[0\]\s*===\s*('|"|`)=\3|value\.charAt\(0\)\s*===\s*('|"|`)=\4|value\.startsWith\(('|"|`)=\5\))|(?:value\[0\]\s*===\s*('|"|`)=\6|value\.charAt\(0\)\s*===\s*('|"|`)=\7|value\.startsWith\(('|"|`)=\8\))\s*\|\|\s*!value\.includes\(\s*element\.id\s*\))\s*\)\s*\{\s*element\.value\s*=\s*evalFormula\(\s*value\.slice\(/); ``` -Ви повинні передати число `1` як аргумент до виклику `.slice()`. +Передайте число `1` як аргумент до виклику `.slice()`. ```js assert.match(code, /const\s+update\s*=\s*\(?\s*event\s*\)?\s*=>\s*\{\s*const\s+element\s*=\s*event\.target;?\s*const\s+value\s*=\s*element\.value\.replace\(\s*\/\\s\/g\s*,\s*('|"|`)\1\s*\);?\s*if\s*\(\s*(!value\.includes\(\s*element\.id\s*\)\s*&&\s*(?:value\[0\]\s*===\s*('|"|`)=\3|value\.charAt\(0\)\s*===\s*('|"|`)=\4|value\.startsWith\(('|"|`)=\5\))|(?:value\[0\]\s*===\s*('|"|`)=\6|value\.charAt\(0\)\s*===\s*('|"|`)=\7|value\.startsWith\(('|"|`)=\8\))\s*\|\|\s*!value\.includes\(\s*element\.id\s*\))\s*\)\s*\{\s*element\.value\s*=\s*evalFormula\(\s*value\.slice\(\s*1\s*\)\s*\);?/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4813c17b37d1e261a566.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4813c17b37d1e261a566.md index 724ffdcdf36..3afb4f1b0e0 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4813c17b37d1e261a566.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d4813c17b37d1e261a566.md @@ -17,7 +17,7 @@ For the second parameter of your `evalFormula()` call, you should call the `.get assert.match(code, /const\s+update\s*=\s*\(?\s*event\s*\)?\s*=>\s*\{\s*const\s+element\s*=\s*event\.target;?\s*const\s+value\s*=\s*element\.value\.replace\(\s*\/\\s\/g\s*,\s*('|"|`)\1\s*\);?\s*if\s*\(\s*(!value\.includes\(\s*element\.id\s*\)\s*&&\s*(?:value\[0\]\s*===\s*('|"|`)=\3|value\.charAt\(0\)\s*===\s*('|"|`)=\4|value\.startsWith\(('|"|`)=\5\))|(?:value\[0\]\s*===\s*('|"|`)=\6|value\.charAt\(0\)\s*===\s*('|"|`)=\7|value\.startsWith\(('|"|`)=\8\))\s*\|\|\s*!value\.includes\(\s*element\.id\s*\))\s*\)\s*\{\s*element\.value\s*=\s*evalFormula\(\s*value\.slice\(\s*1\s*\)\s*,\s*document\.getElementById\(/); ``` -Ви повинні передати `container` як аргумент до виклику `.getElementById()`. +Передайте `container` як аргумент до виклику `.getElementById()`. ```js assert.match(code, /const\s+update\s*=\s*\(?\s*event\s*\)?\s*=>\s*\{\s*const\s+element\s*=\s*event\.target;?\s*const\s+value\s*=\s*element\.value\.replace\(\s*\/\\s\/g\s*,\s*('|"|`)\1\s*\);?\s*if\s*\(\s*(!value\.includes\(\s*element\.id\s*\)\s*&&\s*(?:value\[0\]\s*===\s*('|"|`)=\3|value\.charAt\(0\)\s*===\s*('|"|`)=\4|value\.startsWith\(('|"|`)=\5\))|(?:value\[0\]\s*===\s*('|"|`)=\6|value\.charAt\(0\)\s*===\s*('|"|`)=\7|value\.startsWith\(('|"|`)=\8\))\s*\|\|\s*!value\.includes\(\s*element\.id\s*\))\s*\)\s*\{\s*element\.value\s*=\s*evalFormula\(\s*value\.slice\(\s*1\s*\)\s*,\s*document\.getElementById\(\s*('|"|`)container\9\s*\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e9737f686c76b4078a60f4.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e9737f686c76b4078a60f4.md index bc8858e14b5..13d7e1bfc40 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e9737f686c76b4078a60f4.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e9737f686c76b4078a60f4.md @@ -20,7 +20,7 @@ You should chain the `.join()` method to the `.map()` method. assert.match(code, /arr\s*\.map\(.*\)\s*\.join\(/s); ``` -You should pass an empty string to the `.join()` method. +Передайте порожній рядок до методу `.join()`. ```js assert.match(code, /arr\s*\.map\(.*\)\s*\.join\(\s*('|"|`)\1\s*\)/s); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f28ef082d771e8bf71f94a.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f28ef082d771e8bf71f94a.md index 1f96556397c..9cefe2d912c 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f28ef082d771e8bf71f94a.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f28ef082d771e8bf71f94a.md @@ -13,7 +13,7 @@ For the callback function, pass in `e` as a parameter. # --hints-- -You should pass in `e` as a parameter to your callback function. +Передайте `e` як параметр до функції зворотного виклику. ```js assert.match(code, /playersDropdownList\.addEventListener\(\s*('|"|`)change\1\s*,\s*\(\s*e\s*\)\s*=>\s*\{\s*\}\s*\)/) diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a4a8087e6dec8ec47f16.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a4a8087e6dec8ec47f16.md index fe1ac116179..5519fd27f30 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a4a8087e6dec8ec47f16.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a4a8087e6dec8ec47f16.md @@ -29,7 +29,7 @@ In your `forward` `case`, you should call the `setPlayerCards` function. assert.match(code, /\s*case\s*('|"|`)\s*forward\s*\1\s*:\s*setPlayerCards\(/) ``` -You should pass `players.filter()` to your `setPlayerCards` call. +Передайте `players.filter()` до виклику `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*forward\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(/) diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a5f09a785aed155c0a56.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a5f09a785aed155c0a56.md index fe3800179f3..5fc399faa5f 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a5f09a785aed155c0a56.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a5f09a785aed155c0a56.md @@ -23,7 +23,7 @@ In your `midfielder` `case`, you should call the `setPlayerCards` function. assert.match(code, /\s*case\s*('|"|`)\s*midfielder\s*\1\s*:\s*setPlayerCards\(/) ``` -You should pass `players.filter()` to your `setPlayerCards` call. +Передайте `players.filter()` до виклику `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*midfielder\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(/) diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a8e14fb388edd3242527.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a8e14fb388edd3242527.md index 00e6b3f75b2..53ce3e6f568 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a8e14fb388edd3242527.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a8e14fb388edd3242527.md @@ -23,7 +23,7 @@ In your `defender` `case`, you should call the `setPlayerCards` function. assert.match(code, /\s*case\s*('|"|`)\s*defender\s*\1\s*:\s*setPlayerCards\(/) ``` -You should pass `players.filter()` to your `setPlayerCards` call. +Передайте `players.filter()` до виклику `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*defender\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(/) diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2aa36fcdc63ee4e18fc37.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2aa36fcdc63ee4e18fc37.md index 6c2428827b0..4c1d13e8b74 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2aa36fcdc63ee4e18fc37.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2aa36fcdc63ee4e18fc37.md @@ -23,7 +23,7 @@ In your `goalkeeper` `case`, you should call the `setPlayerCards` function. assert.match(code, /\s*case\s*('|"|`)\s*goalkeeper\s*\1\s*:\s*setPlayerCards\(/) ``` -You should pass `players.filter()` to your `setPlayerCards` call. +Передайте `players.filter()` до виклику `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*goalkeeper\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(/) diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/641fc88d8fa7127f76e0324f.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/641fc88d8fa7127f76e0324f.md index 3f9c0900db1..0cd2234a919 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/641fc88d8fa7127f76e0324f.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/641fc88d8fa7127f76e0324f.md @@ -20,7 +20,7 @@ In your `nickname` case, you should call the `setPlayerCards` function. assert.match(code, /\s*case\s*('|"|`)\s*nickname\s*\1\s*:\s*setPlayerCards\(/) ``` -You should pass `players.filter()` to your `setPlayerCards` call. +Передайте `players.filter()` до виклику `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*nickname\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(/) diff --git a/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-a.md b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-a.md new file mode 100644 index 00000000000..81cc2d54518 --- /dev/null +++ b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-a.md @@ -0,0 +1,45 @@ +--- +id: 64a5529c02815a7d323aab88 +title: The Box Model Question A +challengeType: 15 +dashedName: the-box-model-question-a +--- + +# --description-- + +Being able to inspect and debug your HTML and CSS is critical to frontend development. This lesson will take us through the Chrome Dev Tools, which allow you to see detailed information about your elements and CSS rules, as well as assist you in finding and fixing problems in your code. + +To open up the inspector, you can right-click on any element of a webpage and click “Inspect” or press F12. Go ahead and do that right now to see the HTML and CSS used on this page. + +Don’t get overwhelmed with all the tools you’re now seeing! For this lesson, we want to focus on the Elements and Styles panes. + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +Which panes should you focus on in the Chrome Dev Tools for inspecting and debugging HTML and CSS? + +## --answers-- + +Console and Network + +--- + +Elements and Styles + +--- + +Sources and Application + +--- + +Performance and Memory + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-b.md b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-b.md new file mode 100644 index 00000000000..c830844ef5e --- /dev/null +++ b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-b.md @@ -0,0 +1,42 @@ +--- +id: 64a553ed02815a7d323aab89 +title: The Box Model Question B +challengeType: 15 +dashedName: the-box-model-question-b +--- + +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --text-- + +When inspecting an element in the Chrome Dev Tools, if a style property is shown with a strikethrough, what does it indicate? + +## --answers-- + +The style property is currently disabled and not applied to the element. + +--- + +The style property is overridden by a more specific CSS rule. + +--- + +The style property is deprecated and should not be used. + +--- + +The style property is experimental and may not be supported by all browsers + +## --video-solution-- + +2 diff --git a/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-c.md b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-c.md new file mode 100644 index 00000000000..84cee19aea0 --- /dev/null +++ b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-c.md @@ -0,0 +1,46 @@ +--- +id: 64a5551d02815a7d323aab8a +title: The Box Model Question C +challengeType: 15 +dashedName: the-box-model-question-c +--- +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +Which feature in the Elements pane allows you to select any element on a webpage by hovering over it? + +## --answers-- + +Blue-highlighted icon + +--- + +Styles tab + +--- + +Inspector tab + +--- + +HTML structure view + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-d.md b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-d.md new file mode 100644 index 00000000000..4d882631471 --- /dev/null +++ b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-d.md @@ -0,0 +1,47 @@ +--- +id: 64a55a6102815a7d323aab8b +title: The Box Model Question D +challengeType: 15 +dashedName: the-box-model-question-d +--- +# --description-- + +In the Elements pane, you can see the entire HTML structure of your page. You can click on any of the elements in this pane to select that specific element. Alternatively, you can click the blue-highlighted icon shown below on the left, and hover over any element on the page. + +![Inspector Icon](https://cdn.statically.io/gh/TheOdinProject/curriculum/594984d7c9f9e744577f19ea475b3864e8cc7c91/html_css/v2/foundations/inspecting-html-and-css/imgs/01.png) + +When an element is selected, the Styles tab will show all the currently applied styles, as well as any styles that are being overwritten (indicated by a strikethrough of the text). For example, if you use the inspector to click on the “Your Career in Web Development Starts Here” header on [the TOP homepage](https://www.theodinproject.com/), on the right-hand side you’ll see all the styles that are currently affecting the element, as seen below: + +![Overwritten style](https://cdn.statically.io/gh/TheOdinProject/curriculum/f8fd38fc62578d8e8368f5303126215a492847f0/foundations/html_css/inspecting-html-and-css/imgs/03.png) + + +# --question-- + +## --assignment-- + +Play around with Chrome Dev Tools and see if you can answer the following question. + +## --text-- + +In the Styles pane, what information can you view about an element when it is selected? + +## --answers-- + +HTML structure and CSS rules + +--- + +Styles tab + +--- + +Inspector tab + +--- + +Applied styles and overwritten styles. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-e.md b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-e.md new file mode 100644 index 00000000000..7db2559056a --- /dev/null +++ b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-e.md @@ -0,0 +1,38 @@ +--- +id: 64a669f77a7d00f97013ed0c +title: The Box Model Question E +challengeType: 15 +dashedName: the-box-model-question-e +--- +# --description-- + +Now that you understand the basic syntax of HTML and CSS, we’re going to get serious. The most important skills you need to master with CSS are positioning and layout. Changing fonts and colors is a crucial skill, but being able to put things exactly where you want them on a webpage is even more crucial. After all, how many webpages can you find where absolutely every element is just stacked one on top of another? + +Learning to position elements on a webpage is not that difficult once you understand just a few key concepts. Unfortunately, many learners race through learning HTML and CSS to get to JavaScript and end up missing these fundamental concepts. This leads to frustration, pain, (and funny gifs) because all the JavaScript skills in the world are meaningless if you can’t stick your elements on the page where you need them to be. So with that in mind, let’s get started. + +# --question-- + +## --text-- + +Why is it important to have a solid understanding of CSS in web development? + +## --answers-- + +It allows you to create complex animations and interactive effects. + +--- + +It allows you to create complex animations and interactive effects. + +--- + +It helps in optimizing database queries for improved performance. + +--- + +It enables you to style and design webpages with precision and control. + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-f.md b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-f.md new file mode 100644 index 00000000000..a91d049aee3 --- /dev/null +++ b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-f.md @@ -0,0 +1,49 @@ +--- +id: 64a66c917a7d00f97013ed0d +title: The Box Model Question F +challengeType: 15 +dashedName: the-box-model-question-f +--- +# --description-- + +The first important concept that you need to understand to be successful in CSS is the box model. It isn’t complicated, but skipping over it now will cause you much frustration down the line. + +Every single thing on a webpage is a rectangular box. These boxes can have other boxes in them and can sit alongside one another. You can get a rough idea of how this works by sticking a border on every item on the page like this: + +```css +* { + border: 1px solid red; +} +``` + + +# --question-- + +## --assignment-- + +Add a border to every element on the page and see how the boxes are laid out. + +## --text-- + +What is the fundamental concept in CSS that helps you understand the structure of elements as rectangular boxes? + +## --answers-- + +Box-sizing + +--- + +Box-shadow + +--- + +Box model + +--- + +Border-box + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-g.md b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-g.md new file mode 100644 index 00000000000..b8c981a7aa9 --- /dev/null +++ b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-g.md @@ -0,0 +1,52 @@ +--- +id: 64a6702e7a7d00f97013ed0e +title: The Box Model Question G +challengeType: 15 +dashedName: the-box-model-question-g +--- +# --description-- + +![lines](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/odin-lined.png) + +OK, so there might be some circles in the above image… but when it comes to layout, they fit together like rectangular boxes and not circles. In the end, laying out a webpage and positioning all its elements is deciding how you are going to nest and stack these boxes. + +The only real complication here is that there are many ways to manipulate the size of these boxes, and the space between them, using padding, margin, and border. But to sum it up briefly: + +- `padding` increases the space between the border of a box and the content of the box. +- `margin` increases the space between the borders of a box and the borders of adjacent boxes. +- `border` adds space (even if it’s only a pixel or two) between the margin and the padding. + +Be sure to study the diagrams carefully. + +![the box model](https://cdn.statically.io/gh/TheOdinProject/curriculum/main/foundations/html_css/css-foundations/the-box-model/imgs/box-model.png) + +# --question-- + +## --assignment-- + +Add a border to every element on the page and see how the boxes are laid out. + +## --text-- + +From inside to outside, what is the order of box-model properties? + +## --answers-- + +Content, Margin, Padding, Border + +--- + +Margin, Padding, Content, Border + +--- + +Content, Padding, Border, Margin + +--- + +Padding, Content, Border, Margin + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-h.md b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-h.md new file mode 100644 index 00000000000..3c711550b34 --- /dev/null +++ b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-h.md @@ -0,0 +1,37 @@ +--- +id: 64a674937a7d00f97013ed0f +videoId: rIO5326FgPE +title: The Box Model Question H +challengeType: 15 +dashedName: the-box-model-question-h +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +What does the box-sizing CSS property do? + +## --answers-- + +It determines the order of the box-model properties. + +--- + +It specifies the position of an element on the webpage. + +--- + +It controls how the total width and height of an element are calculated. + +--- + +It sets the background color of an element. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-i.md b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-i.md new file mode 100644 index 00000000000..026ca2c2034 --- /dev/null +++ b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-i.md @@ -0,0 +1,36 @@ +--- +id: 64a6749a7a7d00f97013ed10 +videoId: rIO5326FgPE +title: The Box Model Question I +challengeType: 15 +dashedName: the-box-model-question-i +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +What is the difference between the standard and alternative box model? + +## --answers-- + +The standard box model calculates the width and height of an element based on the content alone, while the alternative box model calculates based on the content plus padding and border. + +--- + +The standard box model includes content, padding, and border, while the alternative box model includes only the content. + +--- + +The standard box model and the alternative box model are the same and have no differences. + +--- + +The standard box model includes only the content, while the alternative box model includes content, padding, and border. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-j.md b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-j.md new file mode 100644 index 00000000000..990fedec175 --- /dev/null +++ b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-j.md @@ -0,0 +1,37 @@ +--- +id: 64a674a47a7d00f97013ed11 +videoId: rIO5326FgPE +title: The Box Model Question J +challengeType: 15 +dashedName: the-box-model-question-j +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Would you use margin or padding to create more space between 2 elements? + +## --answers-- + +Padding + +--- + +Both margin and padding can be used interchangeably + +--- + +Neither margin nor padding can be used to create more space between elements + +--- + +Margin + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-k.md b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-k.md new file mode 100644 index 00000000000..933a01523c2 --- /dev/null +++ b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-k.md @@ -0,0 +1,36 @@ +--- +id: 64a674ac7a7d00f97013ed12 +videoId: rIO5326FgPE +title: The Box Model Question K +challengeType: 15 +dashedName: the-box-model-question-k +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Which CSS property would you use to create more space between the contents of an element and its border? + +## --answers-- + +Margin + +--- + +Padding + +--- + +Border + +--- + +Float + +## --video-solution-- + +2 diff --git a/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-l.md b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-l.md new file mode 100644 index 00000000000..80dfdc527af --- /dev/null +++ b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-l.md @@ -0,0 +1,28 @@ +--- +id: 64a674b97a7d00f97013ed13 +videoId: rIO5326FgPE +title: The Box Model Question L +challengeType: 15 +dashedName: the-box-model-question-l +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +Would you use margin or padding if you wanted two elements to overlap each other? + +## --answers-- + +Padding + +--- + +Margin + +## --video-solution-- + +2 diff --git a/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-m.md b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-m.md new file mode 100644 index 00000000000..c55213cfd1b --- /dev/null +++ b/curriculum/challenges/ukrainian/16-the-odin-project/top-the-box-model/the-box-model-question-m.md @@ -0,0 +1,67 @@ +--- +id: 64a674c27a7d00f97013ed14 +videoId: rIO5326FgPE +title: The Box Model Question M +challengeType: 15 +dashedName: the-box-model-question-m +--- +# --description-- + +Because the box model concept is so incredibly fundamental, let’s dig a bit deeper with [this lesson from MDN](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#what_is_the_css_box_model). It covers the same material as the video above and will introduce you to inline boxes that we will explore in the next lesson. Pay close attention to the examples and take the time to experiment with their in-browser editor! + +# --question-- + +## --text-- + +How do you set the alternative box model for all of your elements? + +## --answers-- + +```css +html { + box-sizing: inherit; +} +*, +*::before, +*::after { + box-sizing: border-box; +} +``` + +--- + +```css +* { + box-sizing: border-box; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +* { + box-sizing: inherit; +} +``` + +--- + +```css +html { + box-sizing: border-box; +} +*, +*::before, +*::after { + box-sizing: inherit; +} +``` + + + +## --video-solution-- + +4 diff --git a/curriculum/challenges/ukrainian/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md b/curriculum/challenges/ukrainian/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md index bc311f2b8ff..586fe365189 100644 --- a/curriculum/challenges/ukrainian/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md +++ b/curriculum/challenges/ukrainian/18-project-euler/project-euler-problems-1-to-100/problem-36-double-base-palindromes.md @@ -62,5 +62,70 @@ doubleBasePalindromes(1000000); # --solutions-- ```js -// solution required +function buildPalindromesBase10(len) { + // Base cases + const palindromes = []; + if (len > 0) { + palindromes.push([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]); + } + if (len > 1) { + palindromes.push([11, 22, 33, 44, 55, 66, 77, 88, 99, 0]); + } + + for (let i = 3; i <= len; i++) { + const lengthIPalindromes = []; + + for (let j = 1; j < 10; j++) { + const firstDigit = j * (10 ** (i - 1)); + const lastDigit = j; + // Build off of palindromes 2 digits shorter + { + const shorterPalindromes = palindromes[i - 3]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 10 + lastDigit); + } + } + // Build off of palindromes 4 digits shorter + if (i > 4) { + const shorterPalindromes = palindromes[i - 5]; + + for (const palindrome of shorterPalindromes) { + lengthIPalindromes.push(firstDigit + palindrome * 100 + lastDigit); + } + } + } + palindromes.push(lengthIPalindromes); + } + return palindromes.flat(); +} + +function isPalindrome(num) { + const numAsString = num.toString(); + const numDigits = numAsString.length; + for (let i = 0; i < numDigits / 2; i++) { + if (numAsString[i] !== numAsString[numDigits - 1 - i]) { + return false; + } + } + return true; +} + +function isPalindromeBase2(num) { + return isPalindrome(num.toString(2)); +} + +function doubleBasePalindromes(n) { + let palindromeSum = 0; + const maxDigits = Math.ceil(Math.log10(n)); + const palindromesBase10 = buildPalindromesBase10(maxDigits); + + // Loop over all palindromes less than n + for (let i = 0; i < palindromesBase10.length && palindromesBase10[i] < n; i++) { + if (isPalindromeBase2(palindromesBase10[i])) { + palindromeSum += palindromesBase10[i]; + } + } + return palindromeSum; +} ```