Course lesson
Loop over and render a list of data using an `each` block in Svelte 3
Quite often we need to be able to loop over and render a list of data that (for example) is returned from the backend.
- Duration
- 1 min
- Access
- Pro
- Transcript
- Available
Quite often we need to be able to loop over and render a list of data that (for example) is returned from the backend.
In this lesson we are going to learn how to use each block from Svelte to iterate over a list of data and render a list of European cities. We're also going to learn how to get the current index while iterating over a list, as well as how to destructure a currently iterated over element of the array.