Find the player who will win the Coin game | Function to check the wining player ; As discussed in the above approach ; Driver function
function findWinner ( n ) { if ( ( n - 1 ) % 6 == 0 ) { document . write ( " " ) ; } else { document . write ( " " ) ; } } var n = 7 ; findWinner ( n ) ;