Given a state aState of the tic-tac-toe game, list all the empty slots and returns the array of their indices.
aState
a state of the game
stateEmptySlots([ 'x', ' ', 'o', 'x', 'o', ' ', 'x', ' ', ' ' ]);// -> [ 1, 5, 7, 8 ] Copy
stateEmptySlots([ 'x', ' ', 'o', 'x', 'o', ' ', 'x', ' ', ' ' ]);// -> [ 1, 5, 7, 8 ]
Given a state
aStateof the tic-tac-toe game, list all the empty slots and returns the array of their indices.