Untitled

mail@pastecode.io avatar
unknown
javascript
3 years ago
345 B
4
Indexable
Never
(async() => {
  console.log("EDV waiting for variable");
  while( typeof tarteaucitron === "undefined"  ) // define the condition as you like
    await new Promise(resolve => setTimeout(resolve, 1000));
  console.log("EDV variable is now defined " + tarteaucitron.services);
})();
console.log("EDV above code doesn't block main function stack");