title: create local variables accessible to all the prototype functions
body: <p>I'm trying to use prototype to add functions to an object, I thought I understand the whole concept, so here's what I did:</p>
  
  <pre><code>function ImgContainer() {
      var current_image = 1;
  }
  
  ImgContainer.prototype = {
      init: function() {
          //initialize
      },
      scrollLeft: function(){
          //scroll left
      }
  }
  
  var imgContainer = new ImgContainer();
  </code></pre>
  
  <p>I assume I can access current_image in both init and scrollLeft, but I'm getting Uncaught ReferenceError: current_image is not defined. </p>
  
  <p>What should I do to have a variable that's accessible in both init and scrollLeft function?</p>