JSFiddle - React, Tailwind, and code Playground
JavaScript
function getIt() {
return Promise.resolve(123);
}
async function main() {
console.log('before');
const res = await getIt();
console.log('after res: ', res);
}
main();
function getIt() {
return Promise.resolve(123);
}
async function main() {
console.log('before');
const res = await getIt();
console.log('after res: ', res);
}
main();