JSFiddle - React, Tailwind, and code Playground

by Elguja Bogveradze

HTML

<div id="str">
0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 00000000000000000000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 00000000000000000000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 00000000000000000000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 00000000000000000000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000...

CSS

div {
    float:left;
    width:100%;
    margin-right:20px;
    word-break:break-all;
    font-family: arial;
}
#str32
{
   display:none;
}
}

JavaScript

random = function random() {
    setInterval(function () {
        var str = $("#str").html();
        var l = str.length;
        var rand = Math.round(Math.random());
        var rand2 = Math.floor(Math.random() * l);
        $("#str").html(str.substr(0, rand2) + rand + str.substr(rand2 + 1));
    }, 1);
};
random();


/*
var n = 0;
var l = $("#str2").html().length;
stepbystep = function stepbystep(l, n) {
    setInterval(function () {
        var rand = Math.round(Math.random());
        var str = $("#str2").html();
        if (n == l) {
            n = 0;
        }

        $("#str2").html(str.substr(0, n) + rand + str.substr(n + 1));
        n++;
    }, 1);
};
//stepbystep(l);
setTimeout(function () {
    stepbystep(l, 0);
}, 0);
setTimeout(function () {
    stepbystep(l, 0);
}, 500);
setTimeout(function () {
    stepbystep(l, 0);
}, 1000);
setTimeout(function () {
    stepbystep(l, 0);
}, 1500);
setTimeout(function () {
    stepbystep(l, 0);
}, 2000);
setTimeout(function () {
    stepbystep(l, 0);
}, 2500);*/