title: Is it possible to get the name of an anonymous JavaScript function?
body: <p>Is it possible to get the name of an anonymous function that declared as follows?</p>
  
  <pre><code>var F = function(){};
  </code></pre>
  
  <p>At first sight, the answer is no, but apparently the browsers know and hold the function name:</p>
  
  <pre><code>var F = function(){};
  var x = new F();
  console.log(x.constructor);   // function F()
  </code></pre>
  
  <p>(Firefox)</p>
  
  <pre><code>var F = function(){};
  var x = new F();
  console.log(x);    // F {}
  </code></pre>
  
  <p>(Chrome)</p>
  
  <p>Is this name somehow accessible? I need it mainly for error logging, so the solution doesn't have to be cross-browser.</p>
  
  <p><strong>Edit for clarification:</strong></p>
  
  <p>I'm getting an objects from external code that I need to know their types, therefore obvious answers like using another declaration ways are not what I'm searching.</p>