Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript sum all array values

const sum = receiptItems.reduce((sum, current) => sum + current.total, 0);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #typescript #sum #array #values
ADD COMMENT
Topic
Name
2+4 =