JSFiddle - React, Tailwind, and code Playground

by Addy Osmani

JavaScript

var tempID=0; 
var sss = ["10001","10002"]; 
    
function runExample(sss, index){
 if(index < sss.length){
    $.getJSON("/echo/json/",{stationCode:sss[index]},function(rstData){ 
        alert(sss[index]);
        index+=1;
        runExample(sss,index);
     }); 
   }
}

runExample(sss, tempID);