Back to JavaScript Errors
JavaScript Error

RangeError

Maximum call stack size exceeded

What does this error mean?

Occurs when a function calls itself too many times, causing a stack overflow.

How to fix RangeError?

Add a base case to stop recursion. Check for infinite loops or reduce recursion depth.

Example
function recurse() { recurse(); } recurse(); // RangeError: Maximum call stack size exceeded