Pergunta de entrevista da empresa Atlassian

Roll forward a string by 1 digit and repeat it based on digits given in an array