JSFiddle - React, Tailwind, and code Playground

JavaScript

var someArray = ["some", "example", "array"];

for (var i=0, item; item=someArray[i]; i++) {
   // item is "some", then "example", then "array"
   // i is the index of item in the array
    alert("someArray[" + i + "]: " + item);
}