title: Returning undefined on an object created by a class
body: <p>Why is this object created based on a class returning undefined? shouldn't it return the 'red'?</p>
  <pre><code>this.name='red' // global.name
  class foo {
      constructor(name){
          this.name= name
          return function (){
              console.log(this.name); // new object is gonna return only this
          }
      }
  }
  let oof = new foo ('green');
  console.log(oof) //name is not defined. Expected to return 'red' (global)
  oof(); //cannot read the property
  function color () {
      console.log(this.name);
  }
  color(); //red
  </code></pre>
  <p>thanks!</p>
  <p><em>Edit1</em>: I misswrote the <code>oof</code>. Corrected now.</p>
  <p><em>Edit2</em>: So guys, I know that a constructor usually don't take a return (it wouldn't make sense) and that the <code>this</code> keyword refers to the object that's going to be created. The thing here is that I was trying to test the limits of the <code>this</code>. In a normal function, <code>this.name</code>would return 'red' as it's called in the global scope. Why it's not working in this case? because it's a function created by a class?</p>
  <p><em>Edit3</em>: To make it clear, I added another function <code>color</code>, which is supposed to be the same as <code>oof</code> (both are functions and called on the window) but refering the globalThis (red). The only difference is the way the are constructed.</p>