How to add the first three elements of a for loop in sightly and show the value as Total. I have code as below
{{each(i, provision) provisionTypes}}
<label class="day-provision-label">
<input type="checkbox" class="day-provision" data-provision-type="${provision}" {{if day[provision]}}checked{{/if}} {{if !day.working}}disabled{{/if}}>
${provision.charAt(0).toUpperCase() + provision.slice(1)}
<span class="provision-rate ui-supporting-text">
$${rates[provision].toFixed(5)}
</span>
</label>
{{/each}}
What I want to do is that in the each for loop, I want to display to the total of the first three elements... Not sure how to?