SOURCE

console 命令行工具 X clear

                    
>
console
// uncomment the line below
// let out1 = [];

const console = {};
console.log = (...msgs) => {
  out1 = out1.concat(msgs.join(''));
}
// starts here ----------------------------

document.querySelector('#output').innerHTML = out1.join('<br>');
<div class='container'>
  <div id='output'>
    <h1 style='color: white;'>
      Switch to Dark Theme to see the result
    </h1>
    <h1 style='color: Black;'>
      Switch to Dark Theme to see the result
    </h1>
  </div>
</div>
body {
  background: #FCFCFC;
}