How to run script and variables. Or not to, as it doesn't actually work.
<div id="output">
#{ let counter = 0; }#
<ul>
#for(let item of items) {#
#if(counter==1) {#<li>#counter#. #item#</li>#} else {#<li>else</li>#}#
#{ counter++; }#
#}#
</ul>
</div>
<script src="https://hashjs.org/hashjs.js"></script>
<script>
const data = {
items: ['Item 1', 'Item 2', 'Item 3']
};
let h = new hashJS("output");
h.bind(data);
</script> #{ let counter = 0; }##for(let item of items) {# #if(counter==1) {#
- #counter#. #item#
#} else {#- else
#}# #{ counter++; }# #}#