title: Prompting the user for 10 inputs, sotring it in an array, finding the average, and printing numbers less than average
body: <p>The title is the question in mind.</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>html&gt;
   &lt;head&gt;
    &lt;title&gt; New Document &lt;/title&gt;
   &lt;/head&gt;
   &lt;script type = "text/javascript"&gt;
   var i;
  var elmt = nums[10];
  var ask = prompt("Please enter 10 numbers");
  var sum = 0
  for(var i =0, i&lt; elmt.length; i++;):
      sum += parseInt(elmt[i], 10);
  
  var avg = sum/elmt.length;
  
   document.write("The sum of all the elements is: " + sum + " The average is: " +avg);
  
   &lt;body&gt;
  
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I'm not really sure what I'm doing to be honest. I tried researching arrays and this questions and similar ones so I can try to learn the syntax but to no avail. I'm practicing this on my own to try and learn. Please don't bash, I'm not asking anyone to do this FOR me, hints would be ok. I'm not some teenager endlessly dumping in code and hoping the internet does my homework.</p>
  
  <p>EDIT1:</p>
  
  <pre><code>&lt;html&gt;
   &lt;head&gt;
    &lt;title&gt; nums &lt;/title&gt;
   &lt;/head&gt;
   &lt;script type = "text/javascript"&gt;
  var sum =0;
  var belowAvg = 0;
  var num = new Array(10);
  var sum = 0
  var i;
  
  for(i = 0; i&lt;10; i++;):
  {
      num[i] = eval(prompt("Enter a number"));
      sum = sum + num[i];
  }
  
  avg = sum/10;
  for (i=0; i&lt;10; i++)
  {
      if ( num[i] &lt; avg)
      {
          belowAvg++;
      }
  }
  
  alert ("average is" + avg);
  alert (belowAvg + "numbers are less than the average");
  
  &lt;/script&gt;
  
   &lt;body&gt;
  
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>EDIT2: </p>
  
  <p>Ok, now I'm extremely lost. Everyone had good answers and all but my understanding isn't enough to apply any of them unfortunately. I've been playing around with all suggestions and I'm still lost. Can anyone show me an example maybe? I didn't want my hand to be held, but....</p>