Loop in Jade (currently known as "Pug") template engine

I want to use a simple loop like for(int i=0; i<10; i++){}.

How do I use it in the Jade engine? I'm working with Node.js and use the expressjs framework.


Solution 1:

for example:

- for (var i = 0; i < 10; ++i) {
  li= array[i]
- }

you may see https://github.com/visionmedia/jade for detailed document.

Solution 2:

Using node I have a collection of stuff @stuff and access it like this:

- each stuff in stuffs
  p
    = stuff.sentence