How to set from 0 value to string dash "-" format

you dint need to write js code inside jinja!
please follow instruction bellow print format for example of using for loop in jinja
you can check this post also:

regards