JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<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);
})(i);
if (i === investorTypes.lenght)
i = 0;
}
}
loopInvestorTypes();
});