title: anchor element creation javascript
body: <p>I had created an anchor element using createElement() (in both chrome and firefox developer tools) and when I try to display the element in the console, I find blank. When trying the same with div element creation, I can see the element displayed in console correctly. Below is the actual code and output. What is the reason for this? Should not the anchor element output as a: [object HTMLAnchorElement]? </p>
  
  <p><strong>Code:</strong>
  In the console of chrome developer tool</p>
  
  <pre><code>var anchor = document.createElement(‘a’)
  console.log(‘anchor: ‘ + anchor)
  </code></pre>
  
  <p><strong>Output</strong>
  a: </p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>var div = document.createElement('div')
  console.log(‘div: ‘ + div)
  </code></pre>
  
  <p><strong>Output</strong>
  div: [object HTMLDivElement]</p>