title: Nested EJS tags
body: <p>I have a database full of game logs that I want to list out.  I don't have a problem listing out the games, but I would like to be able to change how many games to list on the page.  I set this up in a form to input a number to choose how many game logs to display.   I can get the correct info in a console.log, but it is not working on the ejs aspect.</p>
  <p>I am trying to do this below, but the &lt;%= %&gt; tags being nested within the &lt;% %&gt; tags seems to be problematic:</p>
  <pre><code>&lt;% games.slice(&lt;%= listLength %&gt;).reverse().forEach(function(game, index){ %&gt;
  
            
  </code></pre>
  <p>Any ideas on how to access listLength?</p>
  <p>I tried the code below based on another answer on stackoverflow, but the listLength is still not being recorgnized.</p>
  <pre><code>&lt;table&gt;
          &lt;tr&gt;
              &lt;th&gt;Count&lt;/th&gt;
              &lt;th&gt;Date&lt;/th&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;# of Players&lt;/th&gt;
              &lt;th&gt;Winner&lt;/th&gt;
              &lt;th&gt;Winning Score&lt;/th&gt;
              &lt;th&gt;Losing Score&lt;/th&gt;
              &lt;th&gt;Other Details&lt;/th&gt;
          &lt;/tr&gt;
  
          &lt;% games.slice(listLength).reverse().forEach(function(game, index){ %&gt;
  
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;%= index + 1 %&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;%= game.date.toDateString() %&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;%= game.name %&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;%= game.numOfPlayers %&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;%= game.winner %&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;%= game.winningScore %&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;%= game.losingScore %&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;%= game.otherDetails %&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;% }); %&gt;
  
      &lt;/table&gt;
  </code></pre>
  <p>All of the game info is being displayed properly, but the listLength[0].listLength is still not being accepted in the code to change the length of the list.</p>