title: How can I add password protection to a webpage?
body: <p>When I click some image on my site, I want it to ask for a password and check if its right. If the correct password is entered, then go to the site. But i'm pretty new to site making. I am aware that webpage code is open source. Just inspect element and boom. So this password protection code that I came up with is pretty useless.</p>
  
  <pre><code>var userResponse = "N/A";
  
  function askPass() {
      "use strict";
      userResponse = prompt("What's the password?", "000000");
      if (userResponse === "SpeculAcessPls") {
          window.open("www.link.com");
      }
  }
  </code></pre>
  
  <p>What can I do to make my password more secure? </p>