JSFiddle - React, Tailwind, and code Playground

by Pritesh Patel

HTML

<div id="demo">
  
</div>

JavaScript

var arr = ["hi","hello","How R U!"];

for(let i=0; i<arr.length; i++){
  var list = document.createElement("LI");
var textList = document.createTextNode(arr[i]);

list.appendChild(textList);
document.getElementById("demo").append(list);

}