var randomNum = Math.random(); var InfinityVal = Infinity; console.log(randomNum%0);//NaN console.log(Infinity%randomNum);//NaN console.log(randomNum%Infinity);//如果被除数是有限大的数值 而除数是无穷大的数值 结果是 被除数 console.log(10%Infinity);//10 console.log(InfinityVal%InfinityVal);//NaN