Is Javascript Synchronous or Asynchronous ?
Anonymous
I am little bit confused ,according to theory Javascript is synchronous ,so if it is synchronous then the order of the output for below code should be :
console.log("Hi");
setTimeout(() =>{
console.log("My");
},2000);
console.log("you");
Hi My You
But output is coming as : Hi you My.