GUVI
Back

How to Print the output in single line in a for loop statement?

Created 3 years ago
65 Views
3 Comments
Taarun
@Taarun
Taarun
@TaarunProfile is locked. Login

Basic example of printing 1-10 is fine .

for (i=1;i<=10;i++)

{

console.log(i);

}

I need the output as 1 2 3 4 5 6 7 8 9 10

Not in Multiline as

1

2

3

4

etc...

Can someone help me out ?

Comments (3)
Please login to comment.
 
Powered by habitate.io Habitate