JSFiddle - React, Tailwind, and code Playground

HTML

<body>
<p id="item">

</p>

</body>

JavaScript

var cars = ["Saab", "Volvo", 46];

//cars[10] =100;
var text = "<ul>";
for (var i=0; i<cars.length;i++){
	text+="<li>"+cars[i]+"</li>";
}
text += "</ul>";

document.getElementById("item").innerHTML = text;