Typescript Find Max Date In Array Javascript Iteration