Search code examples
javascriptcycle

JavaScript cycle i++ 5.. 10.. 15


i just beginner in JS, in all tutorials i saw lot of examples like that, but it for cycle 1, 2, 3 etc.

for (i=1;i<=20;i++)

So, how to create an cycle: 5, 10, 15, 25 etc?

Thnx for any help!


Solution

  • for (i=5;i<=20;i=i+5)
    

    I think you are looking for this