Determining Whether Lowercase or Uppercase Strings Are 'More Equal' Using an If Statement : If « Language Basics « JavaScript DHTML






Determining Whether Lowercase or Uppercase Strings Are 'More Equal' Using an If Statement

   
<HTML>
<BODY>
<H1>
<SCRIPT> 
   if ("aa" > "AA") { 
       document.write("Lower case is greater than upper case!"); 
   } else if ("hogwarts" == "HOGWARTS") { 
       document.write("They are the same!"); 
   } else { 
      document.write("Upper case is greater than lower case!"); 
   } 
   </SCRIPT>
</H1>
</BODY>
</HTML>


           
         
    
    
  








Related examples in the same category

1.If statement
2.Example for If...Else statement.
3.An if..else if...else statement.
4.The else Block Responds to a false Value
5.Nested if Statements
6.Deeply Nested if. . .else Constructions
7.Compare string and alert in dialog
8.Compare int value
9.Compare string value in if statement
10.Nested if statement, logic operator and regular expression
11.Is your input a Yes
12.Use if statement to check the value range
13.if...then...else...if
14.Nested Indented Conditional statements
15.Testing value in range