You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/each-block-destructured-obj.../main.svelte

13 lines
480 B

<script>
export let objectsArray;
export let firstString;
export let secondString;
</script>
{#each objectsArray as { [firstString]: firstProp, [secondString]: secondProp, [firstString.split('').reverse().join('')]: reverseFirst, [secondString.toUpperCase()]: upperSecond } }
<p>{firstString}: {firstProp}</p>
<p>{secondString}: {secondProp}</p>
<p>{firstString.split('').reverse().join('')}: {reverseFirst}</p>
<p>{secondString.toUpperCase()}: {upperSecond}</p>
{/each}