Stuck In A Javascript Stack Algorithm Stack Overflow

Stuck In A Javascript Stack Algorithm Stack Overflow