Skip to content

Commit 67775b0

Browse files
committed
Fixes
1 parent f620288 commit 67775b0

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

index.html

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ <h2>License</h2>
294294

295295
// Use another Object&#39;s hasOwnProperty and call it with &#39;this&#39; set to foo
296296
({}).hasOwnProperty.call(foo, &#39;bar&#39;); // true
297+
298+
// It&#39;s also possible use the hasOwnProperty property from the Object property for this purpuse
299+
Object.prototype.hasOwnProperty.call(obj, &#39;bar&#39;); // true
297300
</code></pre>
298301

299302
</div><div><h3>In Conclusion</h3>
@@ -741,7 +744,7 @@ <h2>License</h2>
741744
function call that is preceded by the <code>new</code> keyword acts as a constructor.</p>
742745

743746
<p>Inside the constructor - the called function - the value of <code>this</code> refers to a
744-
newly created <code>Object</code>. The <a href="#object.prototype"><code>prototype</code></a> of this <strong>new</strong>
747+
newly created object. The <a href="#object.prototype">prototype</a> of this <strong>new</strong>
745748
object is set to the <code>prototype</code> of the function object that was invoked as the
746749
constructor.</p>
747750

@@ -869,7 +872,7 @@ <h2>License</h2>
869872
especially important to choose a specific style of object creation <strong>and stick</strong>
870873
with it.</p></div></article><article id="function.scopes"><h2>Scopes and Namespaces</h2><div><p>Although JavaScript deals fine with the syntax of two matching curly
871874
braces for blocks, it does <strong>not</strong> support block scope; hence, all that is left
872-
is in the language is <em>function scope</em>.</p>
875+
in the language is <em>function scope</em>.</p>
873876

874877
<pre><code>function test() { // a scope
875878
for(var i = 0; i &lt; 10; i++) { // not a scope
@@ -1096,12 +1099,14 @@ <h2>License</h2>
10961099
() // call the result of the evaluation
10971100
</code></pre>
10981101

1099-
<p>There are other ways for evaluating and calling the function expression; which,
1102+
<p>There are other ways for evaluating and directly calling the function expression; which,
11001103
while different in syntax, do behave the exact same way.</p>
11011104

1102-
<pre><code>// Two other ways
1103-
+function(){}();
1105+
<pre><code>// A few other styles for directly invoking the
1106+
!function(){}()
1107+
+function(){}()
11041108
(function(){}());
1109+
// and so on...
11051110
</code></pre>
11061111

11071112
</div><div><h3>In Conclusion</h3>
@@ -1536,11 +1541,13 @@ <h2>License</h2>
15361541

15371542
<ul>
15381543
<li>Accessing the (unmodified) global variable <code>undefined</code>.</li>
1544+
<li>Accessing a declared <em>but not</em> yet initialized variable</li>
15391545
<li>Implicit returns of functions due to missing <code>return</code> statements.</li>
15401546
<li><code>return</code> statements which do not explicitly return anything.</li>
15411547
<li>Lookups of non-existent properties.</li>
15421548
<li>Function parameters which do not had any explicit value passed.</li>
15431549
<li>Anything that has been set to the value of <code>undefined</code>.</li>
1550+
<li>Any expression in the form of <code>void(expression)</code></li>
15441551
</ul>
15451552

15461553
</div><div><h3>Handling Changes to the Value of <code>undefined</code></h3>

0 commit comments

Comments
 (0)