JavaScript JavaScript Basics Making Decisions with Conditional Statements Add a Final Else Clause

Sirisha Aluru
Sirisha Aluru
3,614 Points

Although , i see the alert with "who are you ?" message, the test does not pass

here is my code: var isAdmin = false; var isStudent = false;

if ( isAdmin ) { alert('Welcome administrator'); } else if (isStudent) { alert('Welcome student'); } else alert('"Who are you?"');

script.js
var isAdmin = false;
var isStudent = false;

if ( isAdmin ) {
    alert('Welcome administrator');
} else if (isStudent) {
    alert('Welcome student');
} else alert('"Who are you?"');
index.html
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>

1 Answer

Steven Parker
Steven Parker
98,077 Points

The instructions did not intend for the quotes to be shown as part of the message. Just remove the extra set of quotes and you'll have it.