Svelte quiz · 21 questions

If-else blocks

Read the code

The code snippet presents a valid if-else block.


    {#if x > 10}
      <p>{x} is greater than 10</p>
    {#else if 5 > x}
      <p>{x} is less than 5</p>
    {#else}
      <p>{x} is between 5 and 10</p>
    {/if}
  • 1–2 answer
  • ← previous
Question 11 of 2148%