Every line of 'js foreach index' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
292 static forEachIndexed(array, action) { 293 for (var tI = 0; tI < array.length; tI++) { 294 action(tI, array[tI]); 295 } 296 }
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
77 function iterate(index, array, result) { 78 if (index >= array.length) { 79 return result; 80 } else return callback(array[index], index).then(function (res) { 81 result.push(res); 82 return iterate(index + 1, array, result); 83 }); 84 }