title: What is document in javascript?
body: <p>as we all know document in javascript is an object.
  If we type <code>window</code> or <code>this</code> in browser console it shows document is object contained inside window object of browser.</p>
  <p><a href="https://i.stack.imgur.com/EOpme.jpg" rel="nofollow noreferrer">IMG : window object containing document object</a></p>
  <p>if we type <code>document</code> it should show methods or properties of document object
  but instead it shows source code of current page.</p>
  <p><a href="https://i.stack.imgur.com/ZxSbC.jpg" rel="nofollow noreferrer">IMG : when we type document</a></p>
  <p>so, what is document actually ?</p>