If a lower case string is greater than, equal to, or less than the same string in upper case characters. : String Comparison « Data Type « JavaScript DHTML





If a lower case string is greater than, equal to, or less than the same string in upper case characters.

  
   
<HTML>
<BODY>
<H1>
   <SCRIPT>
   
   if ("aaa" > "AAA"){
       document.write("Lower case is greater than upper case!"); 
   } else if ("aaa" == "AAA"){
       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.Compare string against integer with a strict test
2.Compare string against integer against simple test
3.Comparing two strings
4.Identity and Equality