For Loop : Task 1
- satyanarayan behera
- Aug 25, 2022
- 1 min read
Write a "for" loop that will perform exactly the same repetitive code as this:
console.log(1)
console.log(2)
console.log(3)
console.log(4)
console.log(5)
console.log('Counting completed!')
1
2
3
4
5
Counting completed!
In For loop:
for (var i=1;i<=5;i++){
console.log(i);
}
console.log('Counting completed!');
Comments