Typescript Find Max Date In Array Javascript Append Function In Matlab