Category: Vanilla Javascript
Added: 11th of October 2022
Viewed: 967 times
What does the script do?
The javascript below outputs the numbers 1 to 10 using a simple for loop.
Set the number of iterations by changing the variable let n={number}
Create a new file on your Desktop named forloop.html, copy and paste the code below then save the file. Launch the file in your browser.