Nested Indented Conditional statements : If « Language Basics « JavaScript DHTML
- JavaScript DHTML
- Language Basics
- If
Nested Indented Conditional statements
<html>
<head>
<title>Nested Indented Conditional statements</title>
<script type="text/javascript">
var prefChoice = 1;
var stateChoice = 'R';
var genderChoice = 'F';
if (prefChoice == 1) {
if (stateChoice == 'R') {
if (genderChoice == 'M') {
document.write("...");
}
}
}
</script>
</head>
<body>
</body>
</html>
Related examples in the same category