title: I'm not sure why `Logger` is not defined when I'm going over a JS Mixin pattern tutorial
body: <p>I'm trying to learn some programming and I was going over <a href="http://bob.yexley.net/dry-javascript-with-mixins/" rel="nofollow">this</a> tutorial and I got this error in the console <code>ReferenceError: Logger is not defined --&gt; }(Logger))</code>. I think the main difference between the tut's code and mine is that the tutorial uses underscore's extend and I thought I would use an extend method(function) that I found somewhere else.</p>
  
  <pre><code>    function extend(destination, source){
          for(var k in source){
              if(source.hasOwnProperty(k)){
                  destination[k] = source[k];
              }
          }
          return destination;
      }
      (function () {
          var Logger = {
              log: function (message) {
                  if (window.console &amp;&amp; typeof console.log === "function") {
                      console.log(message);
                  }
              }
          };
  
          return Logger;
      }());
  
      (function ( Logger) {
          var MyObject = function () {
              this.doSomething = function () {
                  this.log("My Object is doing something!");
              };
          };
  
          // This copies the members of the `Logger` object onto the prototype of `MyObject`
          extend(MyObject.prototype, Logger);
  
          return MyObject;
      }(Logger))
  
      var obj = new MyObject();
      obj.doSomething();
  </code></pre>
  
  <p>Maybe the problem is I don't know how to use self invoking anonymous functions. </p>