Typescript Add Value To Array Javascript Length Function In C