Skip to content

Commit f2d186a

Browse files
committed
Minor copyediting
1 parent f09cef9 commit f2d186a

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

doc/arguments.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ corresponding formal parameter, and the other way around.
4747
}
4848
foo(1, 2, 3);
4949

50-
> **ES5 Note:** These getters and setters are not created in strict mode.
51-
5250
### Performance myths and truths
5351

5452
The `arguments` is, except for the two cases named at the start of this section,
@@ -57,6 +55,8 @@ setters are **always** created; thus, using it has nearly no performance impact
5755
at all, especially not in real world code where there is more than an access to
5856
the arguments object properties.
5957

58+
> **ES5 Note:** These getters and setters are not created in strict mode.
59+
6060
However, there is one case which will drastically reduce the performance in
6161
modern JavaScript engines. That case is the use of `arguments.callee`.
6262

doc/casting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ wherever possible.
1515

1616
// These are false
1717
10 == 010;
18-
10 == '-10'
18+
10 == '-10';
1919

2020
> **Note:** Number literals that start with a `0` are interpreted as octal (Base
2121
> 8).

doc/forinloop.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ chain when iterating over the properties of an object.
1717

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

2323
> **Note:** Since the `for in` always traverses the complete prototype chain, it
24-
> will get slow with each additional layer of inheritance added to an object.
24+
> will get slower with each additional layer of inheritance added to an object.
2525
2626
### Using `hasOwnProperty` for filtering
2727

@@ -34,8 +34,8 @@ object.
3434

3535
This version is the only correct one to use. Due to the use of `hasOwnPropery` it
3636
will **only** print out `moo`. When `hasOwnProperty` is left out, the code is
37-
prone to errors when the native prototypes have been extended; for example,
38-
`Object.prototype`.
37+
prone to errors when the native prototypes (for example,
38+
`Object.prototype`) have been extended.
3939

4040
One widely used framework which does this is [Prototype][1]. When this
4141
framework is included, `for in` loops that do not use `hasOwnProperty` are

doc/functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Functions in JavaScript are first class objects, which means that they can be
44
passed around like any other value. One common use of this feature is to pass
5-
an *anonymous function* as a callback to another, possible asynchronous function.
5+
an *anonymous function* as a callback to another, possibly asynchronous function.
66

77
### The `function` declaration
88

0 commit comments

Comments
 (0)