whole numbers program by javascript

Here’s an example JavaScript program to print the first 10 whole numbers:

javascript
Copy code
for (let i = 1; i <= 10; i++) {
console.log(i);
}
This program uses a for loop to iterate over the numbers from 1 to 10 and prints each number to the console using the console.log() method.


There is no ads to display, Please add some
    wpChatIcon

    SPIN TO WIN!

    • Try your lucky to get discount coupon
    • 1 spin per email
    • No cheating
    Try Your Lucky
    Never
    Remind later
    No thanks