JSFiddle - React, Tailwind, and code Playground

by Fanka Vasilevs

HTML

<span id="investorWaysToInvest">Находчив.</span>

JavaScript

$(document).ready(function() {
            function loopInvestorTypes(){
                var investorTypes = ['Находчив', 'Секси', 'Уникален', 'Маниашки'];
                for (var i = 0; i <= investorTypes.length; i++){

                    (function(i) {
                        setTimeout(function(i) { $("#investorWaysToInvest").text(investorTypes[i]) }, 100 );
                    })(i);

                    if (i === investorTypes.lenght)
                        i = 0;
                }
            }

            loopInvestorTypes();
        });