title: Passing an array as parameter in JavaScript
body: <p>I have an array, and I want to pass it as a parameter in a function such as:</p>
  
  <pre><code>function something(arrayP){
      for(var i = 0; i &lt; arrayP.length; i++){
            alert(arrayP[i].value);
      }
   }
  </code></pre>
  
  <p>I'm getting that arrayP[0] is undefined, which might be true as inside the function I never wrote what kind of array arrayP is. So,</p>
  
  <ol>
  <li>Is is possible to pass arrays as parameters?</li>
  <li>If so, which are the requirements inside the function?</li>
  </ol>