title: Templating a JavaScript function in Jinja
body: <p>I have this function in my script:</p>
  
  <pre><code>function DoThing (num){
   //Do thing
  });
  </code></pre>
  
  <p><code>num</code> refers to each item in a list I created earlier in the script. <code>DoThing(1)</code> will activate for the first item and so on. </p>
  
  <p>I'm working with a Jinja2 template for a multi-page website, and I want to put the function with a custom <code>num</code> argument in each template. </p>
  
  <p>In the first page, I would have DoThing(1). Second page would be DoThing(2). My goal is to add new items and have the template update as needed based on the length of my list.</p>
  
  <p>Is this possible? </p>