Hard-coding a 'wait' in Espruino (and JS in general) really doesn't work very well.
async/await is just a wrapper around promises, and Espruino has promises so you can do everything you can with async/await in Espruino, just slightly more verbosely. However in this case I don't think it helps you...
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
The code @fanoush posted is the best way.
Hard-coding a 'wait' in Espruino (and JS in general) really doesn't work very well.
async/await
is just a wrapper around promises, and Espruino has promises so you can do everything you can with async/await in Espruino, just slightly more verbosely. However in this case I don't think it helps you...