Skip to content

Commit 68ec7a3

Browse files
committed
updated pattern list
1 parent 1f0bda2 commit 68ec7a3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,15 @@ <h3>Selector</h3>
9292
</ul>
9393
</section>
9494

95+
<section>
96+
<h2>Literals and Constructors Patterns</h2>
97+
<ul>
98+
<li><a href="https://github.com/shichuan/javascript-patterns/blob/master/literals-and-constructors/object-literal.html" target="_blank">Object literal</a> - use the simpler and reliable object literal instead of new Object();</li>
99+
<li><a href="https://github.com/shichuan/javascript-patterns/blob/master/literals-and-constructors/enforcing-new.html" target="_blank">Enforcing new</a> - when you forget `new`, `this` inside the constructor will point to the global object</li>
100+
<li><a href="https://github.com/shichuan/javascript-patterns/blob/master/literals-and-constructors/array-literal.html" target="_blank">Array literal</a> - use array literal notation to avoid potential errors when creating dynamic arrays at runtime</li>
101+
</ul>
102+
</section>
103+
95104
<section>
96105
<h2>Design Patterns</h2>
97106
<h3>Creational</h3>

0 commit comments

Comments
 (0)