String comparisons : String comparisons « String « JavaScript Tutorial






<html>
<head>
<title>String comparisons</title>
<script type="text/javascript" language="javascript">
<!-- //
onload = function(){
var firstString = new String("AAA");
var secondString = new String("aaA");

document.write("<h3>Direct comparison of the two strings</h3>");
var comparison = (firstString==secondString);
document.write(comparison);
}
// -->
</script>
</head>
<body>

</body>
</html>








6.2.String comparisons
6.2.1.Compare two strings
6.2.2.String comparisons
6.2.3.String comparisons by converting strings to its uppercase form
6.2.4.localeCompare
6.2.5.Use if statement with String.localeCompare