I want to add a space after console.log in JavaScript, not new line. Like in Python:
for i in range(5):
print(i, end=' ')
I want to add a space after console.log in JavaScript, not new line. Like in Python:
for i in range(5):
print(i, end=' ')
console.log(i + ' ')
This will print a string i and a space after.
end=' ' in Python 3.x suppresses the line feed.print does not log to the console in JavaScript.