mirror of
https://github.com/Fechin/reference.git
synced 2026-11-20 21:23:11 +03:00
Fixed: EJS Loop #453
This commit is contained in:
1 parent
0a8be31bc3
commit
423fab8bda
1 file changed
+5
-5
@@ -162,11 +162,11 @@ Docs {.cols-3}
|
||||
|
||||
### Using loops
|
||||
```html
|
||||
<% if (userLoggedIn) { %>
|
||||
<p>Welcome, <%= username %>!</p>
|
||||
<% } else { %>
|
||||
<p>Please log in.</p>
|
||||
<% } %>
|
||||
<ul>
|
||||
<% for(i=0; i < users.length; i++) { %>
|
||||
<li> <%= users[i].username %> </li>
|
||||
<% } %>
|
||||
</ul>
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user