document.write("!!Infinity=" + !!Infinity + "<br />"); document.write("6/Infinity=" + 6/Infinity + "<br />"); document.write("Infinity/5=" + Infinity/5 + "<br />"); document.write("5/0=" + 5/0 + "<br />"); document.write("Infinity%5=" + Infinity%5 + "<br />"); document.write("5%Infinity=" + 5%Infinity + "<br />"); document.write("Infinity%Infinity=" + Infinity%Infinity + "<br />"); document.write("5%0=" + 5%0 + "<br />");
输出结果是:
!!Infinity=true
6/Infinity=0
Infinity/5=Infinity
5/0=Infinity
Infinity%5=NaN
5%Infinity=5
Infinity%Infinity=NaN
5%0=NaN