title: console textarea bottom to top
body: <p>This code is from <a href="https://stackoverflow.com/questions/20256760/javascript-console-log-to-html">Javascript: console.log to html</a>, I'm trying to figure out how make the new messages go on top rather than one right after the other.</p>
  
  <pre><code>(function() {
      if (!console) {
          console = {};
      }
      var old = console.log;
      var logger = document.getElementById('log');
      console.log = function(message) {
          if (typeof message == 'object') {
              logger.innerHTML += (JSON &amp;&amp; JSON.stringify ?
                  JSON.stringify(message) :
                  String(message)) + '\n';
          } else {
              logger.prepend(message) = logger.innerHTML + message;
          }
      }
  })(); 
  </code></pre>
  
  <p>The "logger.prepend(message) = logger.innerHTML + message;" throws a reference error "invalid statement left-hand side"</p>