I'm using the jQuery library, and attempting to push items to an array:
< onclick ="setFacet('myarray','val');">AOC
var myarray = [];
function setFacet(arr, bb) {
for (var i=0; i< arr.length; i++)
if (arr[i] == bb)
return true;
arr.push(bb);
return false;
}
I get this in chrome:
Object myarray has no method 'push'
myarrayand notarr?