How to use for loop with multiple conditions in Node.js

1 Answer

0 votes
for (let i = 0, j = 10; i < 5 && j > 0; i++, j--) {
      console.log(i, j);
}
         

 
 
 
/*
run:
 
0 10
1 9
2 8
3 7
4 6
 
*/

 



answered Jan 5, 2022 by avibootz

Related questions

1 answer 206 views
1 answer 207 views
4 answers 237 views
1 answer 120 views
...