JSFiddle - React, Tailwind, and code Playground

by ChrisStanyon

HTML

<h1>
Test
</h1>

JavaScript

function GetValue(someVar) {
  return new Promise(resolve => {
    setTimeout(() => { resolve(someVar * someVar)}, 2000);
  });
}

function MyFunction() {
  let wqlist = [['geocond', 1],['geotemp', 2]];
 
  wqlist.forEach(async (i) => {
   console.log(i[0], i[1]);
    let result = await GetValue(i[1]);
    console.log(result);
  });
} 

MyFunction();