I have read some articles and learnt the basic of stack in Javascript, which it operates in LIFO principles. However, most of the tutorial I can find used nested function call as an example. How will the stack operates for a parallel function call like this?
function first () {
console.log(1)
}
function second () {
console.log('expensive computation here')
}
function third (v) {
console.log(v)
}
function runCallback () {
first()
second()
third()
}
runCallback()
If second
conducts some very expensive computation, will it block third
from running? Since these functions are independent(most like to have effect by mutation outside), can I make second
non-blocking without using Promise.all
?