title: Iterating through window object using for in loop
body: <p>Basically i want to print all properties on the <code>window</code> object, i am using:<br></p>
  
  <pre><code>for(var k in window){
  document.write("window object = "+ Object.getOwnPropertyNames(window[k])+ "&lt;br&gt;");
  }
  </code></pre>
  
  <p>I get a weird output with that code.I want to print each property on a new line using <code>for in</code>,how can i do that? thanks!</p>