Contoh janji paling sederhana

let hw = await new Promise((resolve)=>{
resolve(“HELLO WORLD”);

})

console.log(hw);
 
/*basically in resolve(whatever') the whatever is returned*/
/*hw will console.log out "HELLO WORLD" */
Javasper