write a program in java script to print first 10 numbers by using do-while loop
Answers
Answered by
0
Answer:
// program to display numbers
let i = 1;
const n = 10;
// do...while loop from 1 to 10
do {
console.log(i);
i++; //increment operator increases the number value after 1 loop
} while(i <= n);
Explanation:
Similar questions