JSFiddle - React, Tailwind, and code Playground
HTML
<div></div>
CSS
body, html{height:100%;}
div{position:absolute; width:100%; height:100%; background:#000; display:block; font:15px Arial, Helvetica, sans-serif; color:#fff;}
JavaScript
setInterval(function () {
$('div').css('display', 'none');
}, 5000);
var num = 2;
$('div').append('1<br/>')
setInterval(function () {
if (num <= 5) {
$('div').append(num + '<br/>')
num++;
}
}, 1000)