Created
September 9, 2020 17:09
-
-
Save utsukushiihime/3dc637812b8751c65dd5ad61b30a4e68 to your computer and use it in GitHub Desktop.
EJS forEach
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<h1>Here are all the fruits!</h1> | |
<a href="/fruits/new">add fruit (+)</a> | |
<% fruits.forEach((fruit, index) => { %> | |
<li> | |
<a href="/fruits/<%= index %>"> <%= fruit.name %> </a> | |
</li> | |
<% }); %> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment