title: How do I store a user prompt(input) into an array and retrieve it's max and min value?
body: <p>I'm trying to input values into a prompt, convert the values into integers, push the values into an array, and retrieve the min &amp; max values from the array. I don't know wether to convert the user input into integers, or convert the array items into integers. I also need a way of splitting the array from 1 item into the size of the input. For example, user would enter into the prompt "1 2 10 40", and then be alerted that the min is 1, and the max is 40. The array length should be 4. Here's how the code that I'm tampering with:</p>
  
  <pre><code>var numInput = prompt("Enter a series of numbers with spaces in between each:");
  var numArray = [];
  numArray.push(numInput);
  numInput.split(" ");
  alert(Math.min(numArray));
  alert(Math.max(numArray));
  </code></pre>