Most Asked 💯 Javascript | React js | NextJs interview Questions #shortsfeed #javascripttutorial

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Answer - (a) Result in a Maximum call stack exceeded error.
Explanation :-
The code defines two functions, foo and bar, which call each other in a cyclic manner. When you call foo(), it ultimately calls bar(), and when you call bar(), it ultimately calls `foo().

Here's the sequence of events when you call foo():

foo() is called, and it returns the result of bar().
bar() is called, and it returns the result of foo().
This back-and-forth calling will continue indefinitely, causing what's known as an infinite recursion or an infinite loop. JavaScript does not handle infinite recursion well, and it eventually leads to a "Maximum call stack size exceeded" error.
Thankyou.
If still you have any doubt then reply on this comment.

digitalmohit
Автор

RangeError : Maximum call stack size exceeded

manishadabra
join shbcf.ru