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:
S.Hale
2018-11-07 15:34:13 +00:00
committed by Paul Gamble
parent 624f328f29
commit 3920b7c4ce
119 changed files with 551 additions and 536 deletions

View File

@ -51,7 +51,7 @@ console.log(getGrades(90, 100, 75, 40, 89, 95));
### Optimization issues with Array.slice()
There is a little problem, it's not recommended to use slice in the arguments object (optimization reasons)...
There is a little problem; it's not recommended to use slice in the arguments object (optimization reasons)...
> **Important**: You should not slice on arguments because it prevents optimizations in JavaScript engines (V8 for example). Instead, try constructing a new array by iterating through the arguments object.
>

View File

@ -65,7 +65,7 @@ function Person() {
}
```
An arrow function doesn't define it's own `this` value, it inherits `this` from the enclosing function:
An arrow function doesn't define its own `this` value, it inherits `this` from the enclosing function:
```javascript
// ES6 syntax

View File

@ -115,7 +115,7 @@ Javascript did not have a concept of block-scoped variables. Meaning that when d
}
```
Since the variable i does not have block-scope, it's value within all three functions was updated with the loop counter and created malicious values. Closure can help us solve this issue by creating a snapshot of the environment the function was in when it was created, preserving its state.
Since the variable i does not have block-scope, its value within all three functions was updated with the loop counter and created malicious values. Closure can help us solve this issue by creating a snapshot of the environment the function was in when it was created, preserving its state.
```javascript
var funcs = [];

View File

@ -6,7 +6,7 @@ title: Destructuring Assignment
Destructuring Assignment syntax is a Javascript expression that makes it possible to unpack values or properties from arrays or objects.
Lets say that you have an array that contains a first name and last name as it's two values, but you want to reassign those values to something more descriptive. You can use Destructuring to accomplish this.
Lets say that you have an array that contains a first name and last name as its two values, but you want to reassign those values to something more descriptive. You can use Destructuring to accomplish this.
**ES5 Destructuring**

View File

@ -13,7 +13,7 @@ The javascript `for` statement consists of three expressions and a statement:
## Description
* initialization - Run before the first execution on the loop. This expression is commonly used to create counters. Variables created here are scoped to the loop. Once the loop has finished it's execution they are destroyed.
* initialization - Run before the first execution on the loop. This expression is commonly used to create counters. Variables created here are scoped to the loop. Once the loop has finished its execution they are destroyed.
* condition - Expression that is checked prior to the execution of every iteration. If omitted, this expression evaluates to true. If it evaluates to true, the loop's statement is executed. If it evaluates to false, the loop stops.
* final-expression - Expression that is run after every iteration. Usually used to increment a counter. But it can be used to decrement a counter too.
* statement - Code to be repeated in the loop

View File

@ -19,7 +19,7 @@ Another way to store the data on the client side is `localstorage`.
A cookie can be set using the syntax below but a library, like the one mentioned at the end, is highly recommended to make development easier for everyone. While setting the cookie, you can set the expiry for it as well. If skipped, cookie is erased when browser is closed.
**Keep in mind a cookie set by a particular domain can only be read by that domain & it's subdomains only.**
**Keep in mind a cookie set by a particular domain can only be read by that domain & its subdomains only.**
```javascript
// Using vanilla javascript

View File

@ -16,7 +16,9 @@ numbers.forEach(function(number){
```
#### `console.warn`
As you guessed by the name this is used for showing warnings, and it's typical yellow color differentiates it from an error's red text & `console.log`.
As you guessed by the name this is used for showing warnings, and its typical yellow color differentiates it from an error's red text & `console.log`.
```javascript
function isAdult(age){