title: Function not executing when if statement is inserted
body: <p>My class assignment is to create a web page that will prompt the user for their age, then decide if that user is too old/young to play in a youth sport team using the AND and OR operators.</p>
  
  <p>2 functions are required, each being called by their own button. One calls the function that determines eligibility using the AND operator and the other calls the function that uses the OR operator.</p>
  
  <p>In other assignments I have had no problem prompting the user for input and using that input, but every time I try and use an if statement in my function, the web page acts as if nothing happened when I click the buttons to call these functions.</p>
  
  <p>Code pasted below:</p>
  
  <pre><code>&lt;html lang="en"&gt; 
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;link rel="stylesheet" href="style.css"&gt;
  
    &lt;title&gt;Aaron Stockdale's Age Range Page&lt;/title&gt;
    &lt;script type="text/javascript"&gt;
       function andFunction()             
       {
          var userAge = prompt("What's your age?", " ");
  
          if(userAge &gt;= 16 &amp;&amp; userAge &lt;= 18)
            document.getElementById('age').innerHTML = "Age entered " + userAge + "is in range. Can play in youth team.";}
          else
            document.getElementById('age').innerHTML = "Age entered " + userAge + "is not in range. Can play not in youth team.";}
  
       }
  
       function orFunction()              
       {
          var userAge = prompt("What's your age?", " ");
  
          if(userAge &gt; 15 || userAge &lt; 19)
            document.getElementById('age').innerHTML = "Age entered " + userAge + "is in range. Can play in youth team.";}
          else
            document.getElementById('age').innerHTML = "Age entered " + userAge + "is not in range. Can play not in youth team.";}
  
       }
  
    &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
  
      &lt;header&gt;
          &lt;h1&gt;Aaron Stockdale's Age Range Check&lt;/h1&gt;
      &lt;/header&gt;
  
  
  
  
  &lt;section&gt;   
  
      &lt;br&gt;&lt;p&gt;This page will prompt Aaron for his age to check if he can play in the youth team.&lt;/p&gt;
  
      &lt;h2&gt;Click on the button below to enter Aaron's age&lt;/h2&gt;
  
      &lt;p&gt;&lt;input type="button" id="button1" style="border:2px solid #6A959D" value="Enter age and compare with AND operator"
          onclick="andFunction()"/&gt;
  
      &lt;p&gt;&lt;input type="button" id="button1" style="border:2px solid #6A959D" value="Enter age and compare with OR operator"
          onclick="orFunction()"/&gt;
  
  &lt;/section&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>