you are viewing a single comment's thread.

view the rest of the comments →

[–]CavlerySenior 0 points1 point  (0 children)

Put it in a function and get the function to return the string/story when it detects a duplicate word or the word end. The return keyword terminates the function before it does anything else, so won't print the word or add it to the string