On the EJS github page, there is one and only one simple example: https://github.com/visionmedia/ejs
Example
<% if (user) { %> &
<% if (locals.user) { %> // Your logic goes here <% } %>