My program stores the player and computer moves in an array and checks if either has moves in any of the winning combinations. After each round, I have a function that clears the board and the arrays with the stored moves. However, I was clearing the arrays with the
array =  technique, figuring that this would set the arrays back to empty for the new round. Now, according to this article, this technique actually creates a new empty array with the same variable name. It sounds like this can be a useful way to clear arrays if you are interested in keeping the originally declared array in existence, but given that I am passing these arrays around to a number of functions in my program, I am in fact interested in clearing out the original arrays. Sure enough, clearing out my arrays with
array.length = 0 (or, as someone mentions in the comments of the article, with
array.splice(0)) did the trick and now my program works correctly.