Typescript Foreach On Array Javascript Length Of String