What’s the best/standard way of merging two associative arrays in JavaScript? Does everyone just do it by rolling their own for loop?
for
Keep it simple...
function mergeArray(array1,array2) { for(item in array1) { array2[item] = array1[item]; } return array2; }