Third example only works if aJavascriptFunction is sync. If it's async you'd have to do
<div onclick="aJavascriptFunction().then(r => setTimeout(anotherJavascriptFunction, 10000)">Do some stuff</div>
but if you don't know ahead of time whether or not it's async (or don't want to have to care, like hyperscript allows), then you'd need <div onclick="(async () => { await aJavascriptFunction(); setTimeout(anotherJavascriptFunction, 10000) })()">Do some stuff</div>