Huy Tran Huy Tran - 7 months ago 35
Javascript Question

Loop in Jade 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.

Answer

for example:

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

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