let num = [7, 8, 9];
num.forEach(function (value) {
console.log(value);
});
let num = [7, 8, 9];
num.forEach(function (value) {
console.log(value);
});
example() {
for (let item of this.items) {
if (true) {
return;
}
}
// Do stuff in case forEach has not returned
}
let numbers : number[] = [1,2,3,4,5];
numbers.forEach(n=> {
console.log(n);
})
const proj = [
{ id: 1, estimatedBudget: 1000 },
{ id: 2, estimatedBudget: 2000 },
];
let total = 0;
proj.forEach(({ estimatedBudget }) => {
total += estimatedBudget;
});
for (let item of this.items) {
if (true) {
return;
}
}