how to print elements in javascript in a single line? code example
Example: printing in a single line in javascript
var s = "";
for(var i = 1; i < 11; i += 1) {
s += i + " ";
}
console.log(s);
var s = "";
for(var i = 1; i < 11; i += 1) {
s += i + " ";
}
console.log(s);