Node.js RangeError: Maximum call stack size exceeded
问题 I am trying to generate all possible combination of a name from my array productsDeduped and then store the generated combination as productTags array. Here is my code: //function to generate all possible combinations function getCombinations(array) { var i, result = []; for (i = 0; i < array.length; i++) { result.push( array[i], ...getCombinations(array.filter((_, j) => i !== j)).map(v => array[i] + " " + v) ); } return result; } for (var i = 0; i < arrLength; i++) { var productNameStrings =