S
S
smartbe2020-02-02 15:56:29
JavaScript
smartbe, 2020-02-02 15:56:29

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

1 answer(s)
A
Anton Shvets, 2020-02-02
@Xuxicheta

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 question

Ask a Question

731 491 924 answers to any question