Typescript Split String Into Array Js Functions Explained