Why Such Recursion Not Getting Stack-overflowed?
I'm failing to figure out why calling recSetTimeOut() does not result in a stack overflow error, while recPromise() does. Why does it happen? What is the difference between them?
Solution 1:
To my understanding of you question, this is failing because then
does not accept arguments, as you are calling it.
Something like this may yield an expected result...
const recPromise = async () => {
returnPromise.resolve(recPromise())
}
Post a Comment for "Why Such Recursion Not Getting Stack-overflowed?"