Why method b excuted before method a ?
And what i do that method a be excuted before method b?
const a = () => {
setTimeout(function(){console.log("method a excuted")},10000)
}
const b = () => {
console.log("method b excuted");
}
const s = async () => {
await a();
await b();
}
s();
result:
method b excuted
method a excuted //after 10 second