<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>논리연산자</title>
</head>
<body>
<h3>논리연산</h3>
<hr color="green" size=5>
<script>
var x = true; y = false;
document.write("x = " + x + ", y = " + "<br><br>");
document.write("x && y : " + (x && y) + "<br>");
document.write("x ||y : " + (x||y) + "<br>");
document.write("!x : " + (!x) + "<br>");
document.write("<hr color=red size=5>");
document.write("(3 > 2 ) && ( 3 < 4 ) : " + ((3>2) && (3<4)) + "<br>");
document.write("(3 == -2) || (-1 < 0) : " + ((3 == 2) || (-1 < 0)));
</script>
</body>
</html>