title: Defining variable in Meteor.js
body: <p>When I define the variable <code>lists</code> as shown below and type <code>lists</code> in the console, I get the error <code>ReferenceError: lists is not defined</code></p>
  
  <pre><code>var lists = new Meteor.Collection('Lists');
  
  if (Meteor.isClient) {
    Template.hello.greeting = function () {
      return "my list.";
    };
  
    Template.hello.events({
      'click input' : function () {
        // template data, if any, is available in 'this'
        if (typeof console !== 'undefined')
          console.log("You pressed the button");
      }
    });
  }
  
  if (Meteor.isServer) {
    Meteor.startup(function () {
      // code to run on server at startup
    });
  }
  </code></pre>
  
  <p>It works only if I declare <code>lists</code> as a global variable:</p>
  
  <pre><code>lists = new Meteor.Collection('Lists');
  </code></pre>
  
  <p><strong>Question:</strong> Why must it be scoped global?</p>