Turn String Into Array Typescript Interview