Corrected capitalization, corrected to American spellings and typos (#30685)
* Translate challenge subtitles and example challenge text to Spanish * Corrected errors in syntax and punctuation * Multiple corrections of it/s to its plus other grammar corrections * Correction and added paragraph to CSS Flex article * Corrected my own typo * Corrected capitalization, American spellings and typos
This commit is contained in:
@@ -186,7 +186,7 @@ Finally, we need a method to do the actual splitting and we can use `Array.slice
|
||||
### Code Explanation:
|
||||
|
||||
* Array smaller than size is returned nested.
|
||||
* For any array larger than size, it's splited in two. First segment is nested and concatnated with second second segment which makes a recursive call.
|
||||
* For any array larger than size, it is split in two. First segment is nested and concatenated with second segment which makes a recursive call.
|
||||
|
||||
#### Relevant Links
|
||||
|
||||
|
@@ -62,7 +62,7 @@ We have to return a sentence with title case. This means that the first letter w
|
||||
|
||||
We are modifying the `replaceAt` function using prototype to facilitate the use of the program.
|
||||
|
||||
Split the string by white spaces, and create a variable to track the updated title. Then we use a loop to turn turn the first character of the word to uppercase and the rest to lowercase. by creating concatenated string composed of the whole word in lowercase with the first character replaced by it's uppercase.
|
||||
Split the string by white spaces, and create a variable to track the updated title. Then we use a loop to turn turn the first character of the word to uppercase and the rest to lowercase. by creating concatenated string composed of the whole word in lowercase with the first character replaced by its uppercase.
|
||||
|
||||
#### Relevant Links
|
||||
|
||||
|
@@ -6,7 +6,7 @@ title: Global vs. Local Scope in Functions
|
||||
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
|
||||
Remember that global scope means that the variable is available throughout the entire code. Local scope, means that the variable is available within a certain range.
|
||||
|
||||
In this exercise, you have an `outerWear` variable in global scope with "T-shirt" as it's value. You should now create another variable named `outerWear`, but this time within the function `myOutfit()`. The basic code solution as follows:
|
||||
In this exercise, you have an `outerWear` variable in global scope with "T-shirt" as its value. You should now create another variable named `outerWear`, but this time within the function `myOutfit()`. The basic code solution is as follows:
|
||||
|
||||
```javascript
|
||||
var outerWear = "T-shirt";
|
||||
|
@@ -32,7 +32,7 @@ It's required to use template literals to return a list as every element in the
|
||||
```const resultDisplayArray = arr.map(item => `<li class="text-warning">${item}</li>`);```
|
||||
|
||||
## No map() solution
|
||||
Despite it's a less flexible solution, if you know the number of elements in advance, you can enumerate them as in
|
||||
Despite being a less flexible solution, if you know the number of elements in advance, you can enumerate them as in
|
||||
|
||||
```const resultDisplayArray = [`<li class="text-warning">${arr[0]}</li>`,
|
||||
`<li class="text-warning">${arr[1]}</li>`
|
||||
|
@@ -118,7 +118,7 @@ This problem does not involve rearranging the input into different combinations
|
||||
|
||||
* First define an object with all pair possibilities, this allows us to easily find by key or value.
|
||||
* Split `str` into a characters array so we can use each letter to find its pair.
|
||||
* Use the map function to map each character in the array to an array with the character and it's matching pair, creating a 2D array.
|
||||
* Use the map function to map each character in the array to an array with the character and its matching pair, creating a 2D array.
|
||||
|
||||
#### Relevant Links
|
||||
|
||||
|
@@ -67,7 +67,7 @@ Leave anything that doesn't come between A-Z as it is.
|
||||
* A string variable `nstr` is declared and initialized to store the decoded string.
|
||||
* The for loop is used to loop through each character of the input string.
|
||||
* If the character is not uppercase English alphabets(i.e. its ascii doesn't lie between 65 and 91 ), we'll leave it as it is and <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue' target='_blank' rel='nofollow'>continue</a> with next iteration.
|
||||
* If it's the uppercase English alphabet, we'll subtract 13 from it's ascii code.
|
||||
* If it's the uppercase English alphabet, we'll subtract 13 from its ascii code.
|
||||
* If the ascii code is less than 78, it'll get out of range when subtracted by 13 so we'll add 26 (number of letters in English alphabets) to it so that after A it'll go back to Z. e.g. M(77)  77-13 = 64(Not an English alphabet) +26 = 90  Z(90).
|
||||
|
||||
#### Relevant Links
|
||||
|
Reference in New Issue
Block a user