How should I do a while ( x < y ) in jinja2? I've seen the jinja2 docs, it seems like they only support for loop for a declared variable of array and while() is not supported at all.
I think your closest alternative with Jinja2 would be to use a for with range:
{% range number from 3 to 6 %}
{{ number }}
(...)
{% endrange %}
And you can pass the variables from your program to use them in the loop.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With