title: In preparing for 70-480 Microsoft exam, I need help understanding why an añswer is Correct
body: <p>With the code below, customer.name is undefined. Can someone help me understand why and what is going on with the code?</p>
  
  <pre><code>    var customer = function () {
       var name = "Contoso";
       return {
            getName: function () {
                  return name;
            },
            setName: function (newName) {
                  name = newName;
            }
       };
  }();
  alert (customer.name);
  </code></pre>