JSFiddle - React, Tailwind, and code Playground

by rupesx

HTML

<div id="foo">
  
</div>

JavaScript

var x = [1, 2, 3, 4, 5, 6, 7, 8,];

for (var i = 0; i < x.length; i++) {
var node = document.createElement("P");
var textnode = document.createTextNode(x[i]);
node.appendChild(textnode);
document.getElementById("foo").appendChild(node); 
   
}