below are two different ways to use concat. nameage and nameage2 produce somewhat different results, which also seem to be described differently in different browsers.
var name = ["david","ibrahim","lagan"];
var age = [23, 34, 24];
var nameage = name.concat(age);
var nameage2 = [name].concat(age);
for example, in chrome:
console.log(nameage); produces "david,ibrahim,lagan23,34,24", whereas
console.log(nameage2); produces "["david,ibrahim,lagan", 23, 34, 24]"
Can someone explain what the difference is between these two approaches, and how it might impact use of concat? (Is one way more 'correct'?)