title: If Statement Not Displaying Results
body: <p>So the rest of the code works as I need it too. The only part that doesn't work is listed below. What I am trying to accomplish is if the <code>SENTINEL</code> is entered once the program is initiated, <code>numResults</code> and <code>floatResults</code> will receive the following values. Where did I not code properly so the statement doesn't work? Thank you for the help</p>
  <p><strong>if statement giving me the issue</strong></p>
  <pre><code>// gives value if only the SENTINEL is entered once program is initiated
    if (number == SENTINEL &amp;&amp; numValues == 0 &amp;&amp; floatValues == 0 ) {
      numResults = document.getElementById(&quot;numbers&quot;).innerHTML = &quot; No values were entered.&quot;
      floatResults = document.getElementById(&quot;floating&quot;).innerHTML = &quot; No values were entered.&quot;
    }
  </code></pre>
  
  <p><strong>My Code</strong></p>
  
  <pre><code>&lt;script&gt;
  
          function examineNumbers() {
  
  const SENTINEL = -1;
  
  let number = 0;
  let type;
  let numValues = 0;
  let numAverage = 0;
  let floatValues = 0;
  let numTotal = 0;
  let floatTotal = 0;
  let list = document.getElementById(&quot;list&quot;);
  let numbers = document.getElementById(&quot;numbers&quot;);
  let floating = document.getElementById(&quot;floating&quot;);
  
  
  // while loop to only allow numbers greater than zero to be inputted
  while (number != SENTINEL) {
    number = prompt(&quot;Enter a number. Type &quot; + SENTINEL + &quot; to stop.&quot;);
    if (number == -1) {
      break;
    }
    // deterrmines if a number is even
    if (number % 2 == 0) {
      type = &quot; is an even value&quot;;
      numTotal += parseInt(number);
      numValues++;
    }
  
    // determines if a number is odd
    else if (Math.abs(number % 2) == 1) {
      type = &quot; is an odd value&quot;;
      numTotal += parseInt(number);
      numValues++;
    }
  
    // gives a floating point type if above two aren't met
    else {
      type = &quot; is a floating point value.&quot;;
      floatTotal += parseFloat(number);
      numTotal += parseFloat(number);
      numValues++;
      floatValues++;
    }
  
    let numResults;
    let floatResults;
    // averages non floating numbers
    numAverage = numTotal / numValues;
    numResults = document.getElementById(&quot;numbers&quot;).innerHTML = &quot; The total is &quot; + numTotal.toFixed(2) +
      &quot; and the average is &quot; + numAverage.toFixed(2) + &quot;.&quot;;
  
     // gives value if only the SENTINEL is entered once program is initiated
    if (number == SENTINEL &amp;&amp; numValues == 0 &amp;&amp; floatValues == 0 ) {
      numResults = document.getElementById(&quot;numbers&quot;).innerHTML = &quot; No values were entered.&quot;
      floatResults = document.getElementById(&quot;floating&quot;).innerHTML = &quot; No values were entered.&quot;
    }
  
    // averages floating point numbers
    floatAverage = floatTotal / floatValues;
    floatResults = document.getElementById(&quot;floating&quot;).innerHTML = &quot;The sum of just the floating point values is &quot; + floatTotal.toFixed(2) +
      &quot; with the average of &quot; + floatAverage.toFixed(2) + &quot;.&quot;;
  
  
    // gives value if no floating numbers are entered
    if (floatValues == 0 ) {
      floatResults = document.getElementById(&quot;floating&quot;).innerHTML = &quot;No floating-pont values were entered.&quot;
    }
  
  
    let li = &quot;&quot;;
    //only add number and its status to list when number not equal to SENTINEL
    if (number !== SENTINEL) {
      li = document.createElement(&quot;li&quot;);
      li.innerHTML = number + type;
      list.appendChild(li);
  
      // displays information for both non floating numbers and floating numbers
      numbers.innerHTML = numResults;
      floating.innerHTML = floatResults;
    }
  }
  }
      &lt;/script&gt;
  </code></pre>
  
  
  <pre><code>&lt;h1&gt;Number Examination Tool &lt;/h1&gt;
  
  &lt;form name=&quot;myForm&quot; &gt;
  
           &lt;button type=&quot;button&quot; onclick=&quot;examineNumbers();&quot;&gt;Click here to enter numbers &lt;/button&gt;
  
      &lt;h3&gt;List of Numbers &lt;/h3&gt;  
  
      &lt;ul id = &quot;list&quot;&gt;&lt;/ul&gt; 
  
      &lt;div id=&quot;numbers&quot;&gt;&lt;/div&gt;
  
      &lt;div id=&quot;floating&quot;&gt;&lt;/div&gt;
  
      &lt;/form&gt;
  </code></pre>