Join the elements together with a carriage return:
var alpha = ['a', 'b', 'c', 'd'];
var oneString = alpha.join('\n');
alert(oneString);
Or you could use console.log(oneString). You don't even need the intermediate variable - you could do
var alpha = ['a', 'b', 'c', 'd'];
console.log(alpha.join('\n'));
Nice and compact. The join() function will concatenate the elements of the array; it will normally use the comma as separator, but you can override this with your own separator (the argument to the function). That's how this works - very compact, no iterating.
see http://jsfiddle.net/znAPK/
alpha.forEach(function(x) { console.log(x); })jointhe elements of the array with a"\n""separator"?