One of the test cases didn’t pass. It was - steamrollArray([1, {}, [3, [[4]]]]) should return [1, {}, 3, 4]
It’s showing an error - RangeError: Maximum call stack size exceeded
But I don’t understand what is stack or stack size that exceeded?
Can you please explain what’s going on with my code
The ‘call stack’ is a sort of ToDo list of the function calls your computer needs to complete. With an infinite recursion, this stack keeps getting bigger and bigger until JavaScript crashes.