Like, to print number from 1 - 10 horizontally in a for loop.
Oh I get it, you need to tell print() which ending character it needs to print, it defaults to newline:
print()
>>> for i in range(1, 11): ... print(i) ... 1 2 3 4 5 6 7 8 9 10 >>> for i in range(1, 11): ... print(i, end=" ") ... 1 2 3 4 5 6 7 8 9 10
Awesome! it was very helpful :)
How to do that in Javascript?
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Like, to print number from 1 - 10 horizontally in a for loop.
Oh I get it, you need to tell
print()
which ending character it needs to print, it defaults to newline:Awesome! it was very helpful :)
How to do that in Javascript?