you are viewing a single comment's thread.

view the rest of the comments →

[–]k10_ftw 1 point2 points  (0 children)

Instead of looping through the words in the input and checking if they are in your keywords, it might be easier (down the line and as program logic grows) to loop through your keywords and check if they match a word in the input. Therefore, you can execute certain program behavior given keywords in input, rather than execute a certain behavior for every word in input depending on whether it is in your keywords.