Typescript Find Max Date In Array Javascript Iteration Method