title: How to get interface name in implemented function
body: <p>Below is the code I have used to achieve interface concept in javascript:</p>
  
  <pre><code>function Interface1(ImplementingClass) {
    return {
         implementedFunction : ImplementingClass.implementedFunction
    }
  }
  
  function  Interface2(ImplementingClass) {
  
     return {
        implementedFunction : ImplementingClass.implementedFunction
     }
  }
  
  function ImplementingClass() {
   this.implementedFunction = function() {
       // How to get implemented interface name, for 
       // example here interface name should be Interface1???
   }
  }
  
  
  function Test() {
      this.test = function() {
           return new Interface1(new ImplementingClass());
      }
  }
  
  
  var test = new Test();  
  test.test().implementedFunction();
  </code></pre>
  
  <p>Question: How to get interface name in implemented function, for example in java we use instance of operator </p>
  
  <pre><code>if(this instance of Interface) { 
      // Do something  
  }
  </code></pre>