i have the following loops that goes through an array.
for(var j=0; j<10;j++) {
for(var k=0; k<10; k++) {
if(final[k]==ya[j]){
final[k].change
If you don't want to use any framework, thats the code:
function mix(first_arr, second_arr) {
for(i = 0; i < second_arr.length; i++) {
if(first_arr.indexOf(second_arr[i]) == -1) {
first_arr.push(second_arr[i]);
}
}
return first_arr;
}
See in action http://jsfiddle.net/jwAmA/
PD: Use arrays [] instead of objects {}