Master programming syntax, solve interactive challenges & run live code in Syntaxis Explore Arena →
menu_book Course Curriculum (Svelte 5) expand_more
Svelte 5 / Component Syntax

Each blocks

Learn Each blocks in Svelte 5 with a dedicated explanation, a concept-specific example, a production caution, and a mastery check.

12 min read • Beginner
svelte-5-004.svelte
svelte
<script>let items=[{id:1,name:"Mug"},{id:2,name:"Book"}];</script>
<ul>{#each items as item (item.id)}<li>{item.name}</li>{/each}</ul>
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content