Skip to content

Commit b2bbb94

Browse files
Sync svelte docs (#1700)
sync svelte docs Co-authored-by: svelte-docs-bot[bot] <196124396+svelte-docs-bot[bot]@users.noreply.github.com>
1 parent 87428ce commit b2bbb94

File tree

1 file changed

+3
-1
lines changed
  • apps/svelte.dev/content/docs/svelte/03-template-syntax

1 file changed

+3
-1
lines changed

apps/svelte.dev/content/docs/svelte/03-template-syntax/03-each.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ title: {#each ...}
1313
{#each expression as name, index}...{/each}
1414
```
1515

16-
Iterating over values can be done with an each block. The values in question can be arrays, array-like objects (i.e. anything with a `length` property), or iterables like `Map` and `Set` — in other words, anything that can be used with `Array.from`.
16+
Iterating over values can be done with an each block. The values in question can be arrays, array-like objects (i.e. anything with a `length` property), or iterables like `Map` and `Set`— in other words, anything that can be used with `Array.from`.
17+
18+
If the value is `null` or `undefined`, it is treated the same as an empty array (which will cause [else blocks](#Else-blocks) to be rendered, where applicable).
1719

1820
```svelte
1921
<h1>Shopping list</h1>

0 commit comments

Comments
 (0)