Cant put id to div from variable Jade

express, html, node.js, pug

Solution

Something like this?

- var items = ["one", "two", "three"]
each item in items
  div(id= item)

Problem

I have the following in my Jade view: ``` - var items = "one" each item in items div(id= #{items}) ``` what I want is: ``` <div id="one"></div> ``` but Jade renders: ``` <div id="undefinedoneundefined"></div> ``` this is driving me crazy, I'm using Jade with Express.js. BTW I've asked something similar but less clear, hope not to annoy anyone with my silliness.

Original source