js how to use ms to delay code example Example: js add delay await new Promise(resolve => setTimeout(resolve, 1000));