title: How to create a certain function with a for loop to add number as separate property
body: <p>I'm very new to all this. </p>
  
  <p>Create a function called countingArray that takes in an array and a number as arguments. The function should then:</p>
  
  <ol>
  <li>Use a loop to count up to the number passed in</li>
  <li>Add each number in the loop to the array as a separate property</li>
  <li>Return the array</li>
  </ol>
  
  <p>Then call the function with the provided empty array and number variable. </p>
  
  <p>My code: </p>
  
  <pre><code>var emptyArray = [];
  var number = 17;
  
  function countingArray(array,num){
    for (i=0;i&lt;=array.length;i++){
    }
    return array;
  }
  countingArray(emptyArray,number);
  </code></pre>