Typescript Loop Through String Array Method