比如jsp..我在controller有个list传过来....想输出到js里面..供页面js调用..我可以这么写
<script>
var aList = {};
<% for obj in list {%>//<--此处用了jsp循环的伪代码
aList[<%=obj.id%>] = '<%=obj.name%>';
<%}%>
</script>
好吧..你看..jade能怎么写啊
看jade的文档:

根据文档上下文...script标签里面的全是text..不会去给你解析标签的 即使你写 - each xx in xxx...