0 jaggy posted how to merge array in javascript ? var result1 =["data1","data2"]; var result2 =["data3","data4"]; so i try to join one array with another one var result = result1 + result2 ; is that work with like as we do with string concatenation ? Edit Question
2 angeo answered Nov 30 '-1 00:00 one can use forEach and push method to merge two array as well var animals1 = ['pigs', 'goats', 'sheep']; var animals2 = ['dog', 'lion', 'bear']; animals2.forEach(function(value){ animals1 .push(value); }) Edit Answer
1 Mitul Dabhi answered Nov 30 '-1 00:00 + only use for string merging not for array in javascriptits simple var result = result.concat(result2); console.log(result); Edit Answer