JSFiddle - React, Tailwind, and code Playground

HTML

<div id="log"></div>

JavaScript

function typeWritter(texto,idElemento,tempo){
        var char = texto.split('').reverse();
        var typer = setInterval(function () {
            if (!char.length) return clearInterval(typer);
            var next = char.pop();
            document.getElementById(idElemento).innerHTML += next;
        }, tempo);
    }


    typeWritter('Hoje está um lindo dia!','log',100);