I\'m trying to get the output from my for loop to print in a single line in the console.
for(var i = 1; i < 11; i += 1) { console.log(i); }
Build a string then log it after the loop.
var s = ""; for(var i = 1; i < 11; i += 1) { s += i + " "; } console.log(s);