print values in single line in js 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);