JSFiddle - React, Tailwind, and code Playground

by Lee Kowalkowski

HTML

<output></output>

CSS

output {
  display:block;
  height:10em;
  overflow:auto;
  border:2px inset #ccc;
  resize:y;
}

JavaScript

var output = document.querySelector('output');
var then = new Date();

setInterval(function(){
	var now = new Date();
	output.innerHTML += now - then + 'ms<br>';
  output.scrollTop = output.scrollHeight - output.clientHeight;
  then = now;
}, 1000);