title: What's the correct way to write to the script console (console.log) in IE?
body: <p>I have this substitute for <code>console.log</code> defined in <code>document.ready()</code>:</p>
  
  <pre><code>$(document).ready(function(){
    console.log("doc ready");
    if(typeof console === "undefined"){
      console = { log: function() { } };
    }
  }
  </code></pre>
  
  <p>I thought IE was supposed to have this function available but, when I include the call above</p>
  
  <pre><code>  console.log("doc ready");
  </code></pre>
  
  <p>the output appears in the Firefox console but not in IE - in fact IE script execution breaks completely at this point.</p>
  
  <p><strong>What's the correct way to write to the console in IE?</strong></p>