MDN Reference
Optional
In desktop app, prompt() returns a Promise. Thus you should always do await prompt(...) which will work in all environments.
await prompt(...)
MDN Reference