I tried to run the following code in both Firefox and Chrome, it gets run in Firefox but in Chrome: Maximum call stack size exceeded.
const list = new Array(60000).join('1.1').split('.');
function removeItemsFromList() {
var item = list.pop();
if (item) {
removeItemsFromList();
}
};
removeItemsFromList();
Is there any way to prevent it and make it run in all the browsers?