Typescript Add Element To Empty Array Javascript Length Of String