<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="http://tech.saigonist.com/taxonomy/term/144/all" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>namespace</title>
    <link>http://tech.saigonist.com/taxonomy/term/144/all</link>
    <description></description>
    <language>en</language>
          <item>
    <title>JavaScript Namespaces and Closures instead of Global Variables</title>
    <link>http://tech.saigonist.com/b/code/javascript-namespaces-and-closures-instead-global-variables</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;July 12, 2016&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/javascript&quot;&gt;javascript&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/closure&quot;&gt;closure&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/namespace&quot;&gt;namespace&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Have you heard? Global variables are bad, mmkay? So what should we do if we want to create a variable in our script and be able to refer to it elsewhere, globally?&lt;/p&gt;

&lt;h2&gt;What&#039;s in a Namespace?&lt;/h2&gt;

&lt;p&gt;A JavaScript namespace is just an idea or practice rather than an explicit feature of JavaScript. That is, you don&#039;t create a &quot;namespace object&quot; or declare a namespace. Instead, you would implement a namespace by creating and using an object which would contain sub-variables within it, so that those variables didn&#039;t pollute the namespace of the global scope (i.e. everything under the...&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Tue, 12 Jul 2016 07:07:00 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">92 at http://tech.saigonist.com</guid>
  </item>
  </channel>
</rss>
