Transform String Into Array Javascript Methods And Functions