Reduce Function In Array Typescript W3schools