This is probably a very simple question and has probably been answered before but I've researched it and I can't find anything. If I run the following code:
function addElements(arg1,arg2){
return ['b','c'];
}
var arr = ['a',addElements('foo','bar'),'d'];
alert(JSON.stringify(arr));
Then I get an array like this:
['a',['b','c'],'d']
how can I make it create a single dimensional array like this
['a','b','c','d']
Thanks,
Joe