loop array in javascript one line code example
Example: run a loop inside a console.log no blank line
console.log(Array.apply(null, {length: 10}).map(function(el, index){
return index;
}).join(' '));
console.log(Array.apply(null, {length: 10}).map(function(el, index){
return index;
}).join(' '));