<!DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd "><HTML> <Head> <title>New Document</title> <Scripttype= "Text/javascript">window.onload=function(){ if(1>2,2>3)//False,false{alert ('1>2,2>3-true'); } Else{alert ('1>2,2>3-false'); } if(1>2,2<3)//false,true{alert ("1>2,2<3-true"); } Else{alert ('1>2,2<3-false'); } if(1<2,2>3)//True,false{alert ('1<2,2>3-true'); } Else{alert ('1<2,2>3-false'); } if(1<2,2<3)//true,true{alert ("1<2,2<3-true"); } Else{alert ('1<2,2<3-false'); } if(1>2 || 2>3 , 5>2) {alert ('1>2| | 2>3, 5>2-true'); } Else{alert ('1>2| | 2>3, 5>2-false'); } if(1>2 || 2>3 , 5<2) {alert ('1>2| | 2>3, 5<2-true'); } Else{alert ('1>2| | 2>3, 5<2-false'); } } </Script> </Head> <Body> </Body></HTML>
Running the above code will show that the if judgment condition will be the result of the last expression in the two expressions separated by commas
If the comma appears in the judgment