JSFiddle - React, Tailwind, and code Playground
HTML
<div id="replyes0"></div>
<div id="replyes1"></div>
<div id="replyes2"></div>
<div id="replyes3"></div>
JavaScript
var replyes0 = document.getElementById('replyes0');
var replyes1 = document.getElementById('replyes1');
var replyes2 = document.getElementById('replyes2');
var replyes3 = document.getElementById('replyes3');
var randnum = shuffle([1,2,3]);
console.log(randnum);
var index = 0;
for (i = 0 ; i < 4 ; i = randnum[index++]){
var num = i;
console.log(i);
window['replyes'+index].innerHTML = "<p id='" + [('repl')+num] + "'> RESPUESTA "+index+" </p> \n";
}
function shuffle(o){
for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
return o;
}