title: Value of this keyword in different cases is different. Explain
body: <pre><code>this.name = &quot;apple&quot;
  
  let obj1 = {
      name:&quot;banana&quot;,
  
      func1: function(){
          console.log(&quot;inside function1&quot;)
          console.log(this)
  
          function func3(){
              console.log(&quot;inside function3&quot;)
              console.log(this)
          }
          func3()
      },
  
      func2: () =&gt; {
              console.log(&quot;inside function2&quot;)
              console.log(this)
      }
  }
  
  obj1.func1();
  obj1.func2();
  
  
  the output is 
  
      inside function1
      { name: 'banana', func1: [Function: func1], func2: [Function: func2] }
      
      inside function3
      &lt;ref *1&gt; Object [global] {
        global: [Circular *1],
        clearInterval: [Function: clearInterval],
        clearTimeout: [Function: clearTimeout],
        setInterval: [Function: setInterval],
        setTimeout: [Function: setTimeout] {
          [Symbol(nodejs.util.promisify.custom)]: [Getter]
        },
        queueMicrotask: [Function: queueMicrotask],
        clearImmediate: [Function: clearImmediate],
        setImmediate: [Function: setImmediate] {
          [Symbol(nodejs.util.promisify.custom)]: [Getter]
        }
      }
      
      inside function2
      { name: 'apple' }
  </code></pre>
  <p>Why the output for this keyword when used in function1, function2 and function3 are different?
  When this keyword is used inside function1 it is referencing the object but when it is used inside function3 it is pointing to some global object.
  but when this keyword is used inside function2.I don't understand what it is referencing to exactly?</p>