@@ -43,7 +43,7 @@ criterion, belong together. This chapter explores some of the
4343benefits that such clustering provides, and shows techniques for
4444building modules in JavaScript.
4545
46- == Organization ==
46+ == Why modules help ==
4747
4848There are number of reasons why authors divide their books into
4949chapters and sections. These divisions make it easier for a reader to
@@ -76,7 +76,7 @@ be wasting time moving pieces of the program back and forth, and won't
7676accidentally lock yourself into a structure that does not actually fit
7777your program.
7878
79- == Namespacing ==
79+ === Namespacing = ==
8080
8181Most modern programming languages have a scope level between _global_
8282(everyone can see it) and _local_ (only this function can see it).
@@ -97,7 +97,7 @@ module. Later in this chapter, I will discuss way to build reasonably
9797convenient, namespace-isolating modules on top of the primitive
9898concepts that JavaScript gives us.
9999
100- == Reuse ==
100+ === Reuse = ==
101101
102102In a “flat” project, which isn't structured as a set of modules,
103103it is not apparent which parts of the code are
@@ -136,7 +136,7 @@ downloading and upgrading the modules your program depends on. It grew
136136out of Node.js, the browser-less JavaScript environment we will discuss in
137137link:20_node.html#node[Chapter 20], but can also be useful when programming for the browser.
138138
139- == Decoupling ==
139+ === Decoupling = ==
140140
141141Another important role of modules is isolating pieces of code from
142142each other, in the same way that the object interfaces from link:06_object.html#interface[Chapter 6]
0 commit comments