document.getElementById("demo").innerHTML=awaitmyPromise; } myDisplay(); Try it Yourself » The two arguments (resolve and reject) are pre-defined by JavaScript. We will not create them, but call one of them when the executor function is ready. ...