title: Multiply all items in an Array JS
body: <p>I'm new to JavaScript, and are fooling around to really understand the basics. Now I try to make a calculator. A very basic one, that can add, subrtact, devide and multiply. I've gotten it to work with this code(showing multiply only:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var multiply = function () {
  var numbers = prompt("How many numbers do you want to multiply?","At least 2, max 4");
          numbers = Number(numbers);
          switch (numbers){
              case 2:
                  num1 = prompt("Your first number: ");
                  num2 = prompt("Your second number: ");
                  ans = Number(num1) * Number(num2);
                  alert(num1 + " * " +  num2 + " = " + ans);
                  break;
              case 3:
                  num1 = Number(prompt("Your first number: "));
                  num2 = Number(prompt("Your second number: "));
                  num3 = Number(prompt("Your third number: "));
                  ans = Number(num1) * Number(num2) * Number(num3);
                  alert(num1 + " * " +  num2 + " * " + num3 + " = " + ans);
                  break;
              case 4:
                  num1 = Number(prompt("Your first number: "));
                  num2 = Number(prompt("Your second number: "));
                  num3 = Number(prompt("Your third number: "));
                  num4 = Number(prompt("Your fourth number: "));
                  ans = Number(num1) * Number(num2) * Number(num3) * Number(num4);
                  alert(num1 + " * " +  num2 + " * " + num3 + " * " + num4 + " = " + ans);
                  break;
              default:
                  alert("Not valid");
                  break;
          }
  };
  multiply();</code></pre>
  </div>
  </div>
  </p>
  
  <p>My problem is that I'm very limited when it comes to how many numbers the user can multiply. Making a switch case for each possible quantity is going to take a while, so I thought of this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    var multiply = function () {
          var numbers = [];
          var ans = 0;
          var times = prompt("How many numbers do you want to multiply?");
          for(var i = 0; i&lt;times; i++){
              Number(numbers.push(prompt("Please, enter one of your numbers")));
          }
          alert(ans);
      };
      multiply();</code></pre>
  </div>
  </div>
  </p>
  
  <p>So, my question is: How can I get "ans" to be equal to each element of my array "numbers" multiplied with eachother? </p>