KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have an array, and I want to pass it as a parameter in a function such as: function something(arrayP){ for(var i = 0; i < arrayP.length; i++){ alert(arrayP[i].value); } } 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, Is is possible to pass arrays as parameters? If so, which are the requirements inside the function?
Tags (comma-separated)
Save Edits
Cancel