File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ chain when iterating over the properties of an object.
16
16
}
17
17
18
18
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;
20
20
this is done by using the [ ` hasOwnProperty ` ] ( #object.hasownproperty ) method of
21
21
` Object.prototype ` .
22
22
@@ -32,7 +32,7 @@ this is done by using the [`hasOwnProperty`](#object.hasownproperty) method of
32
32
}
33
33
}
34
34
35
- This version is the only correct one to use. Due to the use of ` hasOwnProperty ` it
35
+ This version is the only correct one to use. Due to the use of ` hasOwnProperty ` , it
36
36
will ** only** print out ` moo ` . When ` hasOwnProperty ` is left out, the code is
37
37
prone to errors in cases where the native prototypes - e.g. ` Object.prototype ` -
38
38
have been extended.
@@ -45,7 +45,7 @@ guaranteed to break.
45
45
46
46
It is recommended to ** always** use ` hasOwnProperty ` . Never should any
47
47
assumptions be made about the environment the code is running in, or whether the
48
- native prototypes have been extended or not.
48
+ native prototypes have been extended or not.
49
49
50
50
[ 1 ] : http://www.prototypejs.org/
51
51
You can’t perform that action at this time.
0 commit comments