JSFiddle - React, Tailwind, and code Playground
JavaScript
"use strict";
async function func() {
promise = new Promise( function(resolve) {
resolve("abc");
});
promise.then(alert);
let result = await promise;
alert(promise);
alert(result);
alert(`${promise} g`);
}
let promise;
func();
alert(`${promise} d`);
let b = 5;
alert(b);