JSFiddle - React, Tailwind, and code Playground
JavaScript
function scaryClown() {
return new Promise(resolve => {
var object = {
name: "new",
x: 10,
y: 10
}
resolve(object);
});
}
async function msg() {
const msg = await scaryClown();
console.log('Message:', msg);
}
msg();