A really simply question. I've boiled it down to the simplest version that illustrates my problem.
Why does this vanilla JS return a promise, and how can I get it to return "Hello"?
let result = test()
.then(function(result) {
return result;
});
alert(result);
function test(serialized) {
return new Promise(function(resolve, reject) {
resolve("Hello");
});
}
(async () => { alert(await test()) })();
to get the result fromtest
..!