Index Start with Zero

Hello,

I am trying to display a list using index of the repeat region for numeration. When I write: {{$index+’ - '+data_description}} the number start with 0. So, for the record of 15; I have the start number of 0 and end number of 14.
Is there any way I can make the number start with 1. That way I can the start number can 1 and ending number of 15.

Thank you for your help in advance.

1 Like

Hi Mamadi,

This is just the way indexes work in javascript, so you’ll just need to add 1 to the index to get the value you desire.

That’s was wholesome and cute! I giggled!
Unfortunately nope. It is one of the greatest misteries of humanity.

1 Like

As Ken explained, you can do:

{{($index+1) + ' - ' + data_description}} 
2 Likes

Just add one to it like:

{{($index+1)+’ - '+data_description}}

1 Like

Thank you.