Skip to content

Commit 8a82e70

Browse files
committed
typo and grammar fixes
1 parent 31c5a75 commit 8a82e70

File tree

12 files changed

+19
-19
lines changed

12 files changed

+19
-19
lines changed

doc/en/core/semicolon.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Below is the result of the parser's "guessing" game.
8484
})(window); //<- inserted
8585

8686
> **Note:** The JavaScript parser does not "correctly" handle return statements
87-
> which are followed by a new line, while this is not neccessarily the fault of
87+
> which are followed by a new line, while this is not necessarily the fault of
8888
> the automatic semicolon insertion, it can still be an unwanted side-effect.
8989
9090
The parser drastically changed the behavior of the code above, in certain cases

doc/en/core/undefined.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Some examples for when the value `undefined` is returned:
2222
- Implicit returns of functions due to missing `return` statements.
2323
- `return` statements which do not explicitly return anything.
2424
- Lookups of non-existent properties.
25-
- Function parameters which do not had any explicit value passed.
25+
- Function parameters that do not have any explicit value passed.
2626
- Anything that has been set to the value of `undefined`.
2727

2828
### Handling Changes to the Value of `undefined`

doc/en/function/arguments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ more than a simple access to the `arguments` object's properties.
8989

9090
> **ES5 Note:** These *getters* and *setters* are not created in strict mode.
9191
92-
However, there is one case which will drastically reduce the performance in
92+
However, there is one case that will drastically reduce the performance in
9393
modern JavaScript engines. That case is the use of `arguments.callee`.
9494

9595
function foo() {

doc/en/function/closures.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ override - the *global* variable `count`.
4646

4747
### Closures Inside Loops
4848

49-
One often made mistake is to use closures inside of loops, as if they were
49+
One mistake made frequently is to use closures inside of loops, as if they were
5050
copying the value of the loops index variable.
5151

5252
for(var i = 0; i < 10; i++) {
@@ -85,7 +85,7 @@ The anonymous function that gets passed to `setTimeout` now has a reference to
8585
`e`, whose value does **not** get changed by the loop.
8686

8787
There is another possible way of achieving this; that is to return a function
88-
from the anonymous wrapper, that will then have the same behavior as the code
88+
from the anonymous wrapper, which will then have the same behavior as the code
8989
above.
9090

9191
for(var i = 0; i < 10; i++) {

doc/en/function/constructors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ not using the `new` keyword.
8686

8787
### Creating New Objects via Factories
8888

89-
An often made recommendation is to **not** use `new` since forgetting its use
89+
A recommendation frequently made is to **not** use `new` since forgetting its use
9090
may lead to bugs.
9191

9292
In order to create new object, one should rather use a factory and construct a

doc/en/function/scopes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ unless the *desired effect* is to affect the outer scope.
7272

7373
### Local Variables
7474

75-
The only source for local variables in JavaScript are
75+
The only sources of local variables in JavaScript are
7676
[function](#function.general) parameters and variables that were declared via the
7777
`var` statement.
7878

@@ -175,8 +175,8 @@ moved to the top of the *global scope*.
175175
All scopes in JavaScript, including the *global scope*, have the special name
176176
[`this`](#function.this) defined in them, which refers to the *current object*.
177177

178-
Function scopes also have the name [`arguments`](#function.arguments) defined in
179-
them which contains the arguments that were passed to a function.
178+
Function scopes also have the variable [`arguments`](#function.arguments) defined in
179+
them. [`arguments`](#function.arguments) contains the arguments that were passed to a function.
180180

181181
For example, when trying to access a variable named `foo` inside the scope of a
182182
function, JavaScript will lookup the name in the following order:

doc/en/intro/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Intro
22

3-
**JavaScript Garden** is a growing collection of documentation about the most
4-
quirky parts of the JavaScript programming language. It gives advice to
3+
**JavaScript Garden** is a growing collection of documentation about the
4+
quirkiest parts of the JavaScript programming language. It gives advice to
55
avoid common mistakes, subtle bugs, as well as performance issues and bad
66
practices that non-expert JavaScript programmers may encounter on their
77
endeavours into the depths of the language.

doc/en/object/forinloop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ chain when iterating over the properties of an object.
1616
}
1717

1818
Since it is not possible to change the behavior of the `for in` loop itself, it
19-
is necessary to filter out the unwanted properties inside the loop body ,
19+
is necessary to filter out the unwanted properties inside the loop body,
2020
this is done by using the [`hasOwnProperty`](#object.hasownproperty) method of
2121
`Object.prototype`.
2222

@@ -37,7 +37,7 @@ will **only** print out `moo`. When `hasOwnProperty` is left out, the code is
3737
prone to errors in cases where the native prototypes - e.g. `Object.prototype` -
3838
have been extended.
3939

40-
One widely used framework which does this is [Prototype][1]. When this
40+
One widely used framework that does this is [Prototype][1]. When this
4141
framework is included, `for in` loops that do not use `hasOwnProperty` are
4242
guaranteed to break.
4343

doc/en/object/prototype.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ the features of newer JavaScript engines; for example,
105105
### In Conclusion
106106

107107
It is a **must** to understand the prototypal inheritance model completely
108-
before writing complex code which makes use of it. Also, watch the length of
108+
before writing complex code that makes use of it. Also, watch the length of
109109
the prototype chains and break them up if necessary to avoid possible
110110
performance issues. Further, the native prototypes should **never** be extended
111111
unless it is for the sake of compatibility with newer JavaScript features.

doc/en/other/timeouts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ gets executed might block the thread, it is by **no means** a safe bet that one
1919
will get the exact delay that was specified in the `setTimeout` call.
2020

2121
The function that was passed as the first parameter will get called by the
22-
*global object*, that means, that [`this`](#function.this) inside the called function
22+
*global object*, which means that [`this`](#function.this) inside the called function
2323
refers to that very object.
2424

2525
function Foo() {
@@ -62,7 +62,7 @@ it waiting for execution.
6262

6363
### Dealing with Possible Blocking Code
6464

65-
The easiest as well as most controllable solution, is to use `setTimeout` within
65+
The easiest as well as most controllable solution is to use `setTimeout` within
6666
the function itself.
6767

6868
function foo(){

doc/en/types/casting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The best option is to cast to one of the three possible types **explicitly**.
4747

4848
'' + 10 === '10'; // true
4949

50-
By prepending a empty string a value can easily be casted to a string.
50+
By prepending an empty string a value can easily be casted to a string.
5151

5252
### Casting to a Number
5353

doc/en/types/typeof.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ practical use case, which does **not** happen to be checking the type of an
99
object.
1010

1111
> **Note:** While `typeof` can also be called with a function like syntax
12-
> i.e. `typeof(obj)`, this is not a function call. The two parenthesis will
12+
> i.e. `typeof(obj)`, this is not a function call. The two parentheses will
1313
> behave like normal and the return value will be used as the operand of the
1414
> `typeof` operator. There is **no** `typeof` function.
1515
@@ -33,7 +33,7 @@ object.
3333
{} Object object
3434
new Object() Object object
3535

36-
In the above table *Type* refers to the value, that the `typeof` operator returns.
36+
In the above table *Type* refers to the value that the `typeof` operator returns.
3737
As can be clearly seen, this value is anything but consistent.
3838

3939
The *Class* refers to the value of the internal `[[Class]]` property of an object.

0 commit comments

Comments
 (0)