-3

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=' ')
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437

1 Answers1

-4
console.log(i + ' ')

This will print a string i and a space after.

tdammon
  • 599
  • 1
  • 7
  • 26