dhgamache/Tic-Tac-Toe-JS — comment on commit dfe71893976cd104bad4795e7c55da7771a369c4
File: tictactoe.js line 73
By marcusphillips:

notice that this check will run once per member of the winningCells array. So as you test against the first pattern (0,1,2), you'll either satisfy the first condition above (matchCountP1.length === 3), or the second (p2), or you'll have a cat's game. This code will continue to test the other patterns, but only after alerting 'cats game', and setting up the board anew.