title: Prompt User for Input but display Input on Form
body: <p>Good Morning,</p>
  <p>Does anyone know how to correct the code below? First, I prompt the user for the variables <code>first</code> and <code>second</code> but am failing to have them display on the form. Second, when the user clicks on the <code>Determine the larger number</code> button it is supposed to run the <code>if</code> and <code>else if</code> statement located under the <code>function determineLarge(){</code> but it fails to run. My apologies as I am learning at the university to code this language. Thank you for the help.</p>
  <pre><code> &lt;script&gt;
          function determineLarge(){
  
          let first = prompt (&quot;Enter the first number.&quot;);
              first= document.myForm.first.value;
      
          let second = prompt(&quot;Enter the second number.&quot;);
              second =document.myForm.first.value;
  
              first = parseFloat(first);
              second = parseFloat(second);
  
              let message = &quot;&quot;;
  
              if (first &lt;0 || second &lt;0){
                  message = &quot;You can't use negative numbers.&quot;;
                  }
              else if (first &gt; second){
                  message = &quot;The second number&quot; + &quot;(&quot; + second + &quot;)&quot; + &quot; is smaller.&quot;;
                  }
                  else if (second &gt; first) {
                      message = &quot;The first number&quot; + &quot;(&quot; + first + &quot;)&quot; + &quot; is smaller.&quot;;
                  }
                  else if (first == second || second==first){
                      message = &quot;The first number&quot; + &quot;(&quot; + first + &quot;)&quot; + &quot; is smaller.&quot;;
                  }
  
          document.getElementById(&quot;results&quot;).innerHTML = message;
          }        
  &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;h1&gt;Gary's Smaller of Two Numbers&lt;/h1&gt;
      &lt;form name=&quot;myForm&quot;&gt;
      &lt;p&gt; Enter the first number&lt;/p&gt;
      &lt;input type=&quot;number&quot; name=&quot;first&quot; value=&quot;&quot; onclick=&quot;javascript:determineLarge();&quot;&gt;
      &lt;p&gt;Enter the second number&lt;/p&gt;
      &lt;input type=&quot;number&quot; name=&quot;second&quot; value=&quot;&quot; onclick=&quot;javascript:determineLarge();&quot;&gt;
      &lt;button type=&quot;button&quot; onclick=&quot;determineLarge();&quot;&gt;Determine the larger number&lt;/button&gt;
       &lt;/form&gt;
      &lt;div id=&quot;results&quot;&gt; &lt;/div&gt;
  
  &lt;/body&gt;
  </code></pre>