Reputation: 1155
<html>
<head></head>
<body>
<script type = "text/javascript">
var x = 5;
var y = 8;
if (x < 6)
{
document.write("They are equal");
}
else
{
document.write{"They are NOT equal");
}
</script>
</body>
</html>
Upvotes: 0
Views: 264
Reputation: 78282
I think you have a syntax error:
document.write{"They are NOT equal");
Should be
document.write("They are NOT equal");
Upvotes: 12