The dice problem | Function to find number written on the opposite face of the dice ; Stores number on opposite face of dice ; Print the answer ; Given value of N ; Function call to find number written on the opposite face of the dice
function oppositeFaceOfDice ( N ) { let ans = 7 - N ; document . write ( ans ) ; } let N = 2 ; oppositeFaceOfDice ( N ) ;