Javascript properly configured to reset upon last click. Changed last line to point back to the first message, at index 0.