title: How do you find out the caller Object in JavaScript
body: <p>I have </p>
  
  <pre><code> var X={
       method1 : function(){
                  A();
                },
       method2 : function(){
                  A();
                },
  
      }
  
  function A(){
         console.log('im from methodNAME of ObjNAME ');
  }
  </code></pre>
  
  <p>How can i find out the name of the <strong>method</strong> and <strong>Object</strong> that the function is calling from.?</p>