[Jade] Getting Both Element and Index with each

Tadashi Shigeoka ·  Fri, August 30, 2013

Here’s a memo on how to get the current loop count index in Jade template engine’s each loop.

each item, index in list
  li= item
  if index === 1
    | : First item in list!

Reference Information

node.js - Jade template engine - Each Iteration Offset - Stack Overflow

That’s all from the Gemba.