title: How do I call a function within an IIFE expression
body: <p>Just started out learning js and using the book Javascirpt an Absolute Beginner's Guide. Question is from an example in the book:</p>
  
  <pre><code>var awesomeSauce = (
      function () {     
          var secretCode = "Zorb!";
          function privateCheckCode(code) { 
              if (secretCode == code) { 
                  alert("You are awesome!");   
              } else { 
                  alert("Try again!");   
              }     
          }
      // the public method we want to return     
          return { 
              checkCode: privateCheckCode     
          }; 
      })();
  </code></pre>
  
  <p>Question is how do I go about to call this code?</p>
  
  <pre><code>awesomeSauce("Zorg!"); 
  </code></pre>
  
  <p>doesnt work and neither does </p>
  
  <pre><code>awesomeSauce().privateCheckCode("Zorg!");
  </code></pre>