Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript foreach

const proj = [
  { id: 1, estimatedBudget: 1000 },
  { id: 2, estimatedBudget: 2000 },
];

let total = 0;

proj.forEach(({ estimatedBudget }) => {
  total += estimatedBudget;
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #typescript #foreach
ADD COMMENT
Topic
Name
4+1 =