title: How do I make a password for my html website in javascript
body: <p>I am trying to get this code to redirect to another page when the person types in hello. What should I do?
      
      
      
      </p>
  
  <pre><code>&lt;p&gt;Click the button to demonstrate the prompt box.&lt;/p&gt;
  
  &lt;button onclick="myFunction()"&gt;Try it&lt;/button&gt;
  
  &lt;p id="demo"&gt;&lt;/p&gt;
  
  &lt;script&gt;
  function myFunction() {
      var person = prompt("Please enter your password");
  
     if (person == hello) {
          window.open("http://www.w3schools.com");
      }
      else {
          confirm("Invalid Password")}
  }
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>