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++){
JavaScript is a dynamically typed language. This means that you never need to declare the type of a function argument (or any other variable). So, your code will work as long as arrayP is an array and contains elements with a value property.
arrayP
value