TypeScript – Array reduce()
reduce() method applies a function simultaneously against two values of the array (from left-to-right) as to reduce it to a single value. Syntax array.reduce(callback[, initialValue]); Parameter Details callback − Function to…