title: ES6 accessing variables outside of class
body: <p>If I create a class called <code>Circle</code> : </p>
  
  <pre><code>class Circle{
    constructor(){
      this.cost = this.calculateCost()
    }
    showCosts(){
      console.log(l.findHeight(100));
    }
    calculateCost(){
      console.log(l.findHeight(100));
    }
  }
  </code></pre>
  
  <p>and have two methods that try to access a variable called <code>l</code>, the <code>calculateCost</code> method does not work (it says that cannot findHeight of undefined) because it is getting accessed from the constructor.  But when I call </p>
  
  <p><code>l.showCosts()</code> </p>
  
  <p>outside of the class, it gets called fine.  Why is this?  and how can I fix it?</p>
  
  <pre><code>let l = new Line();
  
  class Line{
    findHeight(x){
      return x;
    }
  }
  </code></pre>