-4

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
  • 107,083
  • 22
  • 201
  • 376

1 Answers1

-4
console.log(i + ' ')

This will print a string i and a space after.

tdammon
  • 589
  • 1
  • 5
  • 24