title: adding Event Listener
body: <p>i am facing a problem with event add event listener function it don't give an error it is just not working i even listened to videos copied and pasted other codes to work and modify my html to work with but it add event listener doesn't work here is my code bellow</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;&lt;title&gt;Main page of a simple website&lt;/title&gt;
      &lt;link rel="stylesheet" type="text/css" href="mstn.css"/&gt;
      &lt;link href='https://fonts.googleapis.com/css?family=Josefin+Slab:100'  rel='stylesheet' type='text/css'&gt;
  
  &lt;/head&gt;
      &lt;body&gt;
          &lt;header&gt;
              &lt;a href="https://www.google.com" target="_parent"&gt;click here to go to google&lt;/a&gt;
              &lt;a href="victimclient.rar" download="victimclient.rar"&gt;here&lt;/a&gt;
  
          &lt;p id="demo"&gt;testing testing testing &lt;/p&gt;
          &lt;p&gt;testing testing testing&lt;/p&gt;
          &lt;h1&gt;whats little g&lt;/h1&gt;
          &lt;script type="text/javascript" src="checkthisout.js"&gt;
              y = document.getElementById("input").addEventListener("click", myFunction);
          if(y){
              function myFunction() { 
                  alert("hello world")
              }
          }
  
          &lt;/script&gt;
          &lt;input holder="password" value="replace here" id="input"/&gt;
  
  
  
      &lt;/body&gt;
  </code></pre>