Typescript Turn String Into Array Javascript Methods And Functions