DEV Community

Discussion on: Add items to an array in Nunjucks

Collapse
 
pepelsbey profile image
Vadim Makeev

Thank you! I had no idea that you can execute arbitrary JS right in the tags.

Do you know where I can read more about that? You’re not just reassigning the value with the pushed item, it’s also wrapped in brackets and you repeat array’s name after a comma. Where this comes from? 🤔

Collapse
 
giulia_chiola profile image
Giulia Chiola

hey Vadim, thank you for your feedback! I just added at the end of the post where I found the push syntax 😊 I can't really tell why this filter is not available on the official docs.