Answers for "for loop svelte"

2

svelte for loop

<ul>
	{#each cats as cat}
		<li><a target="_blank" href="https://www.youtube.com/watch?v={cat.id}">
			{cat.name}
		</a></li>
	{/each}
</ul>
Posted by: Guest on July-09-2021
1

svelte for loop

{#each {length: 3} as _, i}
    <li>{i + 1}</li>
{/each}
Posted by: Guest on September-15-2021

Browse Popular Code Answers by Language