Add Easy#Shortest_repetition in JavaScript.