Answer the question
In order to leave comments, you need to log in
How to solve this iteration problem in PugJS?
nav.navbar.navbar-expand.navbar-light.bg-light: div.collapse.navbar-collapse: ul.navbar-nav
each group, group_name in links
li.nav-item.col-12: span.font-weight-bold= group_name
each link, link_name in group
li.nav-item.col-12: a.nav-link(href='/'+link)= link_name
li.nav-item.col-12: a.nav-link
the nested loop not to enter the top element (from the top loop), but go after it <upper><lower></lower></upper>
<upper></upper><lower></lower>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question