title: javascript initialize to undefined or null or ""
body: <p>Java script has many falsy values as I started learning. I have a program that gets values from a service and loads into an array like this:</p>
  
  <pre><code>function loadNames() {
      Global.names = // what should I use here? undefined, null, "", 0, {} or anything else
      var lnames = getLNames(); // this is doing some magic
          if ( lnames.length !== 0 ) {
              Global.names = new Array();
              for ( var i = 0; i &lt; lnames.length; ++i)
                  Global.names[i] = lnames[i];
      }
  }
  </code></pre>
  
  <p>I want to know the right way of resetting Global.names. What is most appropriate here? In code I only want to check like <code>if ( Global.names )</code></p>
  
  <p>PS: I can't just take the return value into Global.names as the returned object is destroyed later. Hence, I need to do a deep copy</p>
  
  <p>Thanks</p>