#44
Basic math in Nunjucks
Data and Logic · Working
What is this skill?
Basic math in Nunjucks involves performing simple calculations like addition, subtraction, and multiplication directly in your templates to display computed values.
Why is it important?
- Dynamic calculations – Show totals, counts, or computed values
- Progress indicators – Calculate completion percentages
- Date manipulation – Add or subtract days for deadline calculations
- Simple logic – Avoid needing routes for basic arithmetic