Typescript Iterate Through Array Javascript Duplicates Ink