JSFiddle - React, Tailwind, and code Playground
by tr_santi
HTML
<h1>EEFAFEEF - REVOLUTION</h1>
<textarea placeholder="Enter your finenst snance."></textarea>
<button>Hold my feef.</button>
<div></div>
CSS
textarea {
width: 100%;
height: 100px;
display: block;
box-sizing: border-box;
}
button {
margin: 10px 0px;
width: 100%;
height: 30px;
cursor: pointer;
}
JavaScript
var eef = null;
var sus = [];
function fa() {
var rari = sus.shift();
rari ? $("div").append(rari+" ") : clearInterval(eef);
}
function feef(str) {
var e = ["eef", "fuff", "faf", "sus", "feef", "snance"];
sus = str.split(" ").map(function(w) {
var d = e[Math.floor(Math.random() * e.length)];
return w + "-" + d;
});
eef = setInterval(fa, 650);
}
$("button").on("click", function() {
feef($("textarea").val());
})