<a href="javascript:doStuff()">Do Stuff</a>
async function sleep(fn, ms) {
    await new Promise(resolve => setTimeout(resolve, ms))
    fn()
}

async function doStuff() {
	await sleep(validateEmail, 1500)
	await sleep(validateEmail, 1500)
	await sleep(validateEmail, 1500)
	document.body.innerHTML += '<hr>'
}

function validateEmail() {
	document.body.innerHTML += '<br>'+new Date().getTime()
}

View Compiled
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://rawgit.com/facebook/regenerator/master/packages/regenerator-runtime/runtime.js