title: return the first n multiples of the number x
body: <p>Assuming that x is a positive integer, how would I return the first n multiples of the number x?</p>
  
  <p>Here is what I have so far:</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>function multiples(x, n){
    var arr=[];
    for (var i=1; i&lt;=x; ++i)
      arr.push(n*i);
    return arr;
  }
  
  
  console.log(
    multiples(2, 5)
    );</code></pre>
  </div>
  </div>
  </p>
  
  <p>What I want it to return is this: <code>multiples(2, 5) // [2, 4, 6, 8, 10]</code></p>
  
  <p>But what it actually returns is this: <code>[5, 10]</code></p>