Skip to content

Commit 9ee9197

Browse files
committed
Automatic merge from master.
1 parent d760f67 commit 9ee9197

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

index.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ <h1>JavaScript Garden</h1>
3636
<li><a href="#eval">Reasons against <code>eval</code></a></li>
3737
<li><a href="#timeouts"><code>setTimeout</code> and <code>setInterval</code></a></li>
3838
<li><a href="#semicolon">Automatic semicolon insertion</a></li>
39-
</ul></section>
39+
</ul>
4040
</nav>
4141

4242
<header>
@@ -115,7 +115,7 @@ <h1>JavaScript Garden</h1>
115115
the use of property names that would otherwise lead to a syntax error.</p>
116116
</section><section><header><h3>Deleting properties</h3></header>
117117
<p>The only way to actually remove a property from an object is to use the <code>delete</code>
118-
operator; setting the property to <code>undefined</code> or <code>null</code> does <strong>only</strong> remove the
118+
operator; setting the property to <code>undefined</code> or <code>null</code> <strong>only</strong> remove the
119119
value associated with the property, but not the key.</p>
120120
<pre><code>var obj = {
121121
bar: 1,
@@ -132,7 +132,7 @@ <h1>JavaScript Garden</h1>
132132
}
133133
}
134134
</code></pre>
135-
<p>The above outputs both <code>bar undefined</code> and <code>foo null</code> - only <code>baz</code> got actually
135+
<p>The above outputs both <code>bar undefined</code> and <code>foo null</code> - only <code>baz</code> was
136136
removed and is therefore missing from the output.</p>
137137
</section><section><header><h3>Notation of keys</h3></header>
138138
<pre><code>var test = {
@@ -143,9 +143,9 @@ <h1>JavaScript Garden</h1>
143143
<p>Object properties can be both notated as plain characters and as strings. Due to
144144
another mis-design in JavaScript's parser, the above will throw
145145
a <code>SyntaxError</code> prior to ECMAScript 5.</p>
146-
<p>This error arises from the fact that <code>delete</code> is a <em>keyword</em> of the language;
147-
therefore, it must be notated as a <em>string literal</em> in order to ensure working
148-
code under older JavaScript engines.</p></section></article>
146+
<p>This error arises from the fact that <code>delete</code> is a <em>keyword</em>; therefore, it must be
147+
notated as a <em>string literal</em> to ensure that it will be correctly interpreted by
148+
older JavaScript engines.</p></section></article>
149149

150150
<article><section><header><h2 id="prototype">The prototype <a href="#intro">#top</a></h2></header>
151151
<p>JavaScript does not feature a classical inheritance model, instead it uses a
@@ -230,7 +230,7 @@ <h1>JavaScript Garden</h1>
230230
other built in prototypes.</p>
231231
<p>This technique is called <a href="http://en.wikipedia.org/wiki/Monkey_patch">monkey patching</a> and breaks <em>encapsulation</em>. While
232232
used by widely spread frameworks such as <a href="http://prototypejs.org/">Prototype</a>, there is still no good
233-
reason for cluttering built in types with additional <em>non-standard</em> functionality.</p>
233+
reason for cluttering built-in types with additional <em>non-standard</em> functionality.</p>
234234
<p>The <strong>only</strong> good reason for extending a built-in prototype is to backport
235235
the features of newer JavaScript engines; for example,
236236
<a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach"><code>Array.forEach</code></a>.</p>
@@ -1244,7 +1244,7 @@ <h1>JavaScript Garden</h1>
12441244
<p>By using the <strong>not</strong> operator twice, a value can be converted a boolean.</p>
12451245
<pre><code>!!'foo'; // true
12461246
!!''; // false
1247-
!!'0'; // false
1247+
!!'0'; // true
12481248
!!'1'; // true
12491249
!!'-1' // true
12501250
!!{}; // true

0 commit comments

Comments
 (0)