Every Statement of code get executed one by one so basically a statement has to wait for earliar statement to get executed.
console.log("javascript");
console.log("run");
console.log("code");
It will print javascript first then run then code .
It allow to program excuted immediatly without blocking the code unlike the synchronous method. it doesnot wait for earliear statment to get excuted first.
Each task excuted completed independly.
console.log("javascript")
setTimeOut(()=>{
console.log("run");
2000
})
console.log("code")
It will print javascript then code then run.