let values1 = [1, 2, 3];
angular.forEach(values1, function(value){
$compile(value)($scope);
});
let values2 = ['a', 'b', 'c'];
angular.forEach(values2, function(value){
$compile(value)($scope);
});
foo();
I am seeking assistance on how to ensure that function foo() is only executed after both forEach loops have completed. As a beginner, any guidance would be appreciated.