aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/ejs/examples/functions.ejs
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/ejs/examples/functions.ejs')
-rw-r--r--node_modules/ejs/examples/functions.ejs9
1 files changed, 9 insertions, 0 deletions
diff --git a/node_modules/ejs/examples/functions.ejs b/node_modules/ejs/examples/functions.ejs
new file mode 100644
index 0000000..bd5610e
--- /dev/null
+++ b/node_modules/ejs/examples/functions.ejs
@@ -0,0 +1,9 @@
+<h1>Users</h1>
+
+<% function user(user) { %>
+ <li><strong><%= user.name %></strong> is a <%= user.age %> year old <%= user.species %>.</li>
+<% } %>
+
+<ul>
+ <% users.map(user) %>
+</ul> \ No newline at end of file