Javascript logical operators - and vs. or
问题 I'm relatively new to Javascript and programming in general. Today while writing a simple triple dice roll simulator I struck a problem that I worked around but which I still don't understand. Here's my code... // ROLLING TRIPLES var diceSides = 6; var diceOne = Math.floor(Math.random() * diceSides + 1); var diceTwo = Math.floor(Math.random() * diceSides + 1); var diceThree = Math.floor(Math.random() * diceSides + 1); var rolls = 3; while ((diceOne !== diceTwo) || (diceTwo !== diceThree)) {