See the light - agile, industrial strength, rapid web application development made easy

(Quick Reference) # 7.2.1.2 Logic and Iteration - Reference Documentation Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari Version: 2.3.8 ## 7.2.1.2 Logic and Iteration Using the `<% %>` syntax you can embed loops and so on using this syntax:
    <html>
       <body>
          <% [1,2,3,4].each { num -> %>
             <p><%="Hello ${num}!" %></p>
          <%}%>
       </body>
    </html>
As well as logical branching:
    <html>
       <body>
          <% if (params.hello == 'true')%>
          <%="Hello!"%>
          <% else %>
          <%="Goodbye!"%>
       </body>
    </html>
| Quick Reference (hide)