The Call Stack_

I have a error : RangeError: Maximum call stack size exceeded. Can someone explain this error ? Thanks

function chicken() {
   return egg();
 }
 function egg() {
   return chicken();
 }
console.log(chicken() + " came first."); // → ??

Your code attempts to run forever, but the stack is only so large, so eventually you max it out. Because each function calls the other function, this continues until the stack is maxed out.

2 Likes