EJS

EJS

While Hawkejs has its own template expressions, it also supports plain old EJS (Embedded JavaScript). That looks like this:

This is some text.<br>
<%= "This will be uppercased".toUpperCase() %>
<br>
<% for (i = 0; i < 4; i++) { %>
    <%= "Loop nr " + i %>
    <br>
<% } %>

When this template is rendered, it will output this:

This is some text.<br>
THIS WILL BE UPPERCASED
<br>

    Loop nr 0
    <br>

    Loop nr 1
    <br>

    Loop nr 2
    <br>

    Loop nr 3
    <br>