Rasi
answered Nov 30 '-1 00:00
JavaScript is single threaded script , single threaded means it run one thread at a time
var d=0;
d++;
in above code it will run one by one script . first var d=0; and than d++;
it use call stack to run function , call stack is stack function of the running . call stack have LIFO(Last in first out) order execution .
function first(){
console.log('first')
}
function second(){
return first();
}
second();
first come in stack is second() than first() and first() goes first out and than second() so i called it LIFO (Last in First out ) order.