Menu BAR

FEEL FREE TO ASK ANY PROGRAM and please mention any error if you find it

12 Feb 2024

NODE JS PROGRAM - PRINT NUMBERS FROM 1 TO 10


## Write a Node Js program to print numbers from 1 to 10



// Define the upper limit for the loop
const limit = 10;

// Print numbers from 1 to the limit using a for-loop

console.log("Printing numbers using a for loop:");
for (let i = 1; i <= limit; i++) { 
                  console.log(i);
}

No comments:

Post a Comment