Printing in a single line in JavaScript code example
Example 1: how to print a line in javascript
console.log("Your line would be here")//Prints a line on the console
alert("Your message here")//Raises an alert
Example 2: printing in a single line in javascript
var s = "";
for(var i = 1; i < 11; i += 1) {
s += i + " ";
}
console.log(s);