DEV Community

Discussion on: Daily Challenge #140 - I love you, a little, a lot, passionately ... not at all

Collapse
 
nickholmesde profile image
Nick Holmes

You're right about the (n+6)%6 (its correct, but the +6 does nothing).

However, SavagePixie cleverly rotated the items in the array down one position, to essentially pre-calculate the -1 offset for the first item - so its working correctly.

Thread Thread
 
wheatup profile image
Hao

Ah, I see. Didn't pay attention there, my bad. Thanks for the explanation. 😀