- Instant help with your JavaScript coding problems

Use for loop in Pug template

Question:
How to use for loop in Pug template?
Answer:
ul
    - for (let i = 1; i <= 10; i++) {
        li #{i}
    - }
Description:

Pug supports two primary methods of iteration: each and while . You can also use for as an alias of each

Share "How to use for loop in Pug template?"
Tags:
pug, iteration, loop, for, each, template, express
Technical term:
Use for loop in Pug template