Compare string against integer against simple test
<html>
<head>
<title>Equality</title>
<script type = "text/javascript">
var x = 2;
var y = "2"; if (x == y) {
document.write("x is equal to y with a simple test.");
} else {
document.write("x is not equal to y");
}
</script>
</head>
</html>