Answer the question
In order to leave comments, you need to log in
JS, cycles in PUG. Whether it is necessary?
PUG is a tool for speeding up layout, it has things that are understandable at first glance and not understandable, for example, create lists (UL) in cycles.
Is it necessary to do this? Wouldn't it be easier not to use it so as not to slow down another developer's reading of the code? Or is it a MUST in layout?
Answer the question
In order to leave comments, you need to log in
pug is not a tool for speeding up layout.
This is a template engine. It builds a page according to the template and data. And loops are there for building styled lists from arrays of data.
It's not a question of whether it is necessary or not, without a cycle you simply won't make the desired template.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question